mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 18:19:27 +00:00
feat(members): allow owners to manage roles and remove members
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user