fix: various fixes to sentry-reported errors and more

This commit is contained in:
Hampus Kraft
2026-02-18 15:38:51 +00:00
parent 302c0d2a0c
commit 0517a966a3
357 changed files with 25420 additions and 16281 deletions

View File

@@ -33,6 +33,7 @@ import type {
LookupUserResponse,
UserAdminResponse,
} from '@fluxer/schema/src/domains/admin/AdminUserSchemas';
import type {WebAuthnCredentialListResponse} from '@fluxer/schema/src/domains/auth/AuthSchemas';
export async function getCurrentAdmin(config: Config, session: Session): Promise<ApiResult<UserAdminResponse | null>> {
const client = new ApiClient(config, session);
@@ -417,3 +418,29 @@ export async function sendPasswordReset(
const client = new ApiClient(config, session);
return client.postVoid('/admin/users/send-password-reset', {user_id: userId}, auditLogReason);
}
export async function listWebAuthnCredentials(
config: Config,
session: Session,
userId: string,
): Promise<ApiResult<WebAuthnCredentialListResponse>> {
const client = new ApiClient(config, session);
return client.post<WebAuthnCredentialListResponse>('/admin/users/list-webauthn-credentials', {
user_id: userId,
});
}
export async function deleteWebAuthnCredential(
config: Config,
session: Session,
userId: string,
credentialId: string,
auditLogReason?: string,
): Promise<ApiResult<void>> {
const client = new ApiClient(config, session);
return client.postVoid(
'/admin/users/delete-webauthn-credential',
{user_id: userId, credential_id: credentialId},
auditLogReason,
);
}