feat: ✨ Add collaboration
This commit is contained in:
12
apps/builder/services/user/user.ts
Normal file
12
apps/builder/services/user/user.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Plan, User } from 'db'
|
||||
import { isNotDefined, sendRequest } from 'utils'
|
||||
|
||||
export const updateUser = async (id: string, user: User) =>
|
||||
sendRequest({
|
||||
url: `/api/users/${id}`,
|
||||
method: 'PUT',
|
||||
body: user,
|
||||
})
|
||||
|
||||
export const isFreePlan = (user?: User) =>
|
||||
isNotDefined(user) || user?.plan === Plan.FREE
|
Reference in New Issue
Block a user