Merge branch 'master' into preview
This commit is contained in:
commit
aea361719f
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sink",
|
||||
"type": "module",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.7.1",
|
||||
"engines": {
|
||||
|
||||
@ -7,6 +7,10 @@ export function useAPI(api: string, options?: object): Promise<unknown> {
|
||||
Authorization: `Bearer ${localStorage.getItem('SinkSiteToken') || ''}`,
|
||||
},
|
||||
})).catch((error) => {
|
||||
if (error?.status === 401) {
|
||||
localStorage.removeItem('SinkSiteToken')
|
||||
navigateTo('/dashboard/login')
|
||||
}
|
||||
if (error?.data?.statusMessage) {
|
||||
toast(error?.data?.statusMessage)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user