Skip to content

Commit

Permalink
fix project creation (#5015)
Browse files Browse the repository at this point in the history
  • Loading branch information
liady authored Mar 8, 2024
1 parent b94ee92 commit 9d72950
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions utopia-remix/app/routes/v1.project.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { proxy } from '../util/proxy.server'
import { handle, handleOptions } from '../util/api.server'
import { Status } from '../util/statusCodes'
import { UserProjectPermission } from '../types'
import { validateProjectAccess } from '../handlers/validators'
import { ALLOW, validateProjectAccess } from '../handlers/validators'

export async function loader(args: LoaderFunctionArgs) {
return handle(args, {
Expand All @@ -23,9 +23,7 @@ export async function action(args: ActionFunctionArgs) {
return handle(args, {
PUT: {
handler: proxy,
validator: validateProjectAccess(UserProjectPermission.CAN_MANAGE_PROJECT, {
getProjectId: (params) => params.id,
}),
validator: ALLOW,
},
})
}

0 comments on commit 9d72950

Please sign in to comment.