Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed May 31, 2024
1 parent 421b0e8 commit 991fa10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/backend/src/api/v1/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ users.post("/", checkAccess("teamMembers", "create"), async (ctx: Context) => {
email,
orgId,
role,
verified: config.skipEmailVerify,
singleUseToken: token,
}

Expand Down
7 changes: 6 additions & 1 deletion packages/frontend/utils/dataHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ export function useOrg() {
() => isSignedIn && `/users/me/org`,
)

const { trigger: addUserToOrg } = useSWRMutation(`/users`, fetcher.post)
const { trigger: createUserTrigger } = useSWRMutation(`/users`, fetcher.post)

async function addUserToOrg(user) {
await createUserTrigger(user)
mutate()
}

const scheme = useFixedColorScheme()

Expand Down

0 comments on commit 991fa10

Please sign in to comment.