feat(members): allow owners to manage roles and remove members

This commit is contained in:
yiling
2026-06-07 15:28:05 +08:00
parent e0aa642549
commit 62a2cb3589
13 changed files with 404 additions and 31 deletions
+7
View File
@@ -1,6 +1,7 @@
import { hc } from 'hono/client'
import type { AppType } from '@shumai/api'
import { useAuthStore } from '@/ui/stores/auth'
import { toast } from 'sonner'
const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
const response = await fetch(input, init)
@@ -18,6 +19,12 @@ const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
}
}
if (response.status === 403) {
toast.error('You do not have permission. Please contact the team admin.', {
id: 'forbidden-error',
})
}
return response
}