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
+4 -4
View File
@@ -58,15 +58,15 @@ export function FileBrowserToolbar({
const isCollection = !!collection
const { data: folderInfo } = useQuery({
queryKey: ['folders', teamId, assetId],
queryKey: ['folders', assetId],
queryFn: async () => {
const res = await client.api.teams[':teamId'].folders[':folderId'].$get({
param: { teamId: teamId, folderId: assetId },
const res = await client.api.folders[':folderId'].$get({
param: { folderId: assetId },
})
if (!res.ok) throw new Error('failed to fetch folder')
return (await res.json()) as unknown as AssetInfo
},
enabled: isCollection && !!teamId && !!assetId,
enabled: isCollection && !!assetId,
})
const { data: members } = useQuery({