fix(frontend): Remove unnecessary role when creating user
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import type { FormSubmitEvent } from '@nuxt/ui'
|
import type { FormSubmitEvent } from '@nuxt/ui'
|
||||||
import { UserRole } from '~/.api-client'
|
|
||||||
import type { SignInSchema, SignUpSchema } from '~/types/schemas'
|
import type { SignInSchema, SignUpSchema } from '~/types/schemas'
|
||||||
import type { RouteLocationRaw } from 'vue-router'
|
import type { RouteLocationRaw } from 'vue-router'
|
||||||
import { useAuthClient } from '~/composables/auth/useAuthClient'
|
import { useAuthClient } from '~/composables/auth/useAuthClient'
|
||||||
@@ -48,8 +47,7 @@ export function useAuthActions() {
|
|||||||
await createUser({
|
await createUser({
|
||||||
id: ctx.data.user.id,
|
id: ctx.data.user.id,
|
||||||
name: ctx.data.user.name,
|
name: ctx.data.user.name,
|
||||||
status: 'ACTIVE',
|
status: 'ACTIVE'
|
||||||
role: UserRole.Employee
|
|
||||||
})
|
})
|
||||||
console.log('User created in backend successfully')
|
console.log('User created in backend successfully')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user