refactor(authz): move to domain-based authz and flatten routes

This commit is contained in:
yiling
2026-05-25 23:51:37 +08:00
parent 35fd5c78ce
commit 9f9549255d
61 changed files with 1646 additions and 1147 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
},
})
const $put = client.api.teams[':teamId'].projects[':projectId'].$put
const $put = client.api.projects[':projectId'].$put
const { mutate: updateProject } = useMutation<
InferResponseType<typeof $put>,
Error,
@@ -81,7 +81,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
>({
mutationFn: async (payload) => {
const res = await $put({
param: { teamId: teamId, projectId: project!.id! },
param: { projectId: project!.id! },
json: payload,
})
if (!res.ok) throw new Error('Failed to update project')