mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 23:24:21 +00:00
refactor(authz): move to domain-based authz and flatten routes
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user