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
@@ -57,8 +57,8 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
// Delete Skill
const deleteMutation = useMutation({
mutationFn: async (id: string) => {
const res = await client.api.teams[':teamId'].skills[':id'].$delete({
param: { teamId, id },
const res = await client.api.skills[':id'].$delete({
param: { id },
})
if (!res.ok) throw new Error('Failed to delete skill')
},
@@ -499,8 +499,8 @@ const ConfigSkillDialog = ({
setIsSaving(true)
try {
const res = await client.api.teams[':teamId'].skills[':id'].config.$patch({
param: { teamId, id: skill.id },
const res = await client.api.skills[':id'].config.$patch({
param: { id: skill.id },
json: { config: finalConfig },
})
if (!res.ok) {