fix: hold the ratchets after the SSO unlink and the day pager window

- The SSO unlink answers with a response contract (adminSsoUnlinkResponseSchema).
- It reuses linkOidcIdentity with nulls instead of a new repository method,
  so UsersRepository keeps its method count and size.
- The client calls the route through apiClient, so api/client.ts does not
  grow, and its confirm dialog takes no async callback.
- The pager's preview step and pagesFor keep their complexity.
This commit is contained in:
Maurice
2026-11-12 15:56:59 +01:00
parent b53130ca0d
commit f2ac12ca4f
11 changed files with 33 additions and 29 deletions
@@ -1,4 +1,4 @@
import { adminApi } from '../../api/client';
import { adminApi, apiClient } from '../../api/client';
import type { TranslationFn } from '../../types';
interface UserActionsHost {
@@ -58,7 +58,7 @@ export function useAdminUserActions(admin: UserActionsHost, t: TranslationFn) {
/** Forgets the user's SSO identity so the next SSO sign-in links again (#3065); true when it worked. */
const unlinkSso = async (user: { id: number }): Promise<boolean> => {
try {
await adminApi.unlinkUserSso(user.id);
await apiClient.delete(`/admin/users/${user.id}/sso`);
toast.success(t('admin.sso.unlinkDone'));
return true;
} catch {