refactor(client): remove excess api version header

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-02-06 20:58:23 +08:00
parent f4a5b37892
commit 5cf00407b4
17 changed files with 305 additions and 187 deletions

View File

@@ -1,6 +1,5 @@
import type { ServiceUserUserInfoData } from '@/client';
import { useUpdateUser } from '@/hooks/data/useUpdateUser';
import { ver } from '@/lib/apiVersion';
import { EditProfileDialogView } from './edit-profile.dialog.view';
export function EditProfileDialogContainer({ data }: { data: ServiceUserUserInfoData }) {
@@ -9,7 +8,7 @@ export function EditProfileDialogContainer({ data }: { data: ServiceUserUserInfo
<EditProfileDialogView
user={data}
updateProfile={async (data) => {
await mutateAsync({ body: data, headers: ver('20260205') });
await mutateAsync({ body: data });
}}
/>
);

View File

@@ -1,6 +1,5 @@
import { useUpdateUser } from '@/hooks/data/useUpdateUser';
import { useOtherUserInfo } from '@/hooks/data/useUserInfo';
import { ver } from '@/lib/apiVersion';
import { utf8ToBase64 } from '@/lib/utils';
import { ProfileView } from './profile.view';
@@ -11,7 +10,7 @@ export function ProfileContainer({ userId }: { userId: string }) {
<ProfileView
user={data.data!}
onSaveBio={async (bio) => {
await mutateAsync({ body: { bio: utf8ToBase64(bio) }, headers: ver('20260205') });
await mutateAsync({ body: { bio: utf8ToBase64(bio) } });
}}
/>
);