refactor: rename userSwitchTo
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m6s

This commit is contained in:
2025-09-18 11:50:02 -04:00
parent 3cc4b570d5
commit 4e9ad82d96
9 changed files with 72 additions and 66 deletions

View File

@@ -7,8 +7,8 @@ export function useUserSwitching() {
async function userSwitchTo(userId: string | number) {
try {
const { data, errors } = await useGraphqlMutation("userSwitchTo", { userId });
if (errors.length || !data.userSwitchTo) {
const { data, errors } = await useGraphqlMutation("switchTo", { userId });
if (errors.length || !data.switchTo) {
throw new Error("Une erreur est survenue");
}
await refreshUserSession();