File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 55 ListTable ,
66 Resource ,
77 Tushan ,
8- createAuthHttpClient ,
98} from 'tushan' ;
109import {
1110 IconDashboard ,
@@ -19,7 +18,7 @@ import {
1918 IconUserGroup ,
2019 IconWifi ,
2120} from 'tushan/icon' ;
22- import { authProvider } from './auth' ;
21+ import { authHTTPClient , authProvider } from './auth' ;
2322import { Dashboard } from './components/Dashboard' ;
2423import { fileFields , groupFields , mailFields , messageFields } from './fields' ;
2524import { i18n } from './i18n' ;
@@ -30,7 +29,7 @@ import { SocketIOAdmin } from './routes/socketio';
3029import { SystemConfig } from './routes/system' ;
3130import { SystemNotify } from './routes/system/notify' ;
3231
33- const dataProvider = jsonServerProvider ( '/admin/api' , createAuthHttpClient ( ) ) ;
32+ const dataProvider = jsonServerProvider ( '/admin/api' , authHTTPClient ) ;
3433
3534function App ( ) {
3635 return (
Original file line number Diff line number Diff line change 1- import { AuthProvider , createAuthProvider } from 'tushan' ;
1+ import {
2+ AuthProvider ,
3+ createAuthHttpClient ,
4+ createAuthProvider ,
5+ HTTPClient ,
6+ } from 'tushan' ;
27
38export const authStorageKey = 'tailchat:admin:auth' ;
49
510export const authProvider : AuthProvider = createAuthProvider ( {
611 authStorageKey,
712 loginUrl : '/admin/api/login' ,
813} ) ;
14+
15+ export const authHTTPClient : HTTPClient = createAuthHttpClient ( authStorageKey ) ;
You can’t perform that action at this time.
0 commit comments