2
0

feat(dashboard): 🛂 Limit create folder to Pro user

This commit is contained in:
Baptiste Arnaud
2022-02-12 10:23:58 +01:00
parent b1f54b77c6
commit 3a7b9a0c63
14 changed files with 333 additions and 10 deletions

View File

@ -1,5 +1,5 @@
import { User } from 'db'
import { sendRequest } from 'utils'
import { Plan, User } from 'db'
import { isNotDefined, sendRequest } from 'utils'
export const updateUser = async (id: string, user: User) =>
sendRequest({
@ -7,3 +7,6 @@ export const updateUser = async (id: string, user: User) =>
method: 'PUT',
body: user,
})
export const isFreePlan = (user?: User) =>
isNotDefined(user) || user?.plan === Plan.FREE