Compare commits
	
		
			2 Commits
		
	
	
		
			acf1816b55
			...
			6839ae5742
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 6839ae5742 | |
|  | cb43b8a39b | 
|  | @ -0,0 +1,7 @@ | |||
| import { api } from '../internal'; | ||||
| 
 | ||||
| export function avatarURL(user: FG.User, thumbnail = true) { | ||||
|   return `${api.defaults?.baseURL || ''}/users/${user.userid}/avatar${ | ||||
|     thumbnail ? '?thumbnail' : '' | ||||
|   }`;
 | ||||
| } | ||||
|  | @ -54,7 +54,9 @@ export default boot(({ router }) => { | |||
|   api.interceptors.request.use((config) => { | ||||
|     const store = useMainStore(); | ||||
|     if (store.session?.token) { | ||||
|       config.headers = { Authorization: 'Bearer ' + store.session.token }; | ||||
|       config.headers = Object.assign(config.headers || {}, { | ||||
|         Authorization: `Bearer ${store.session.token}`, | ||||
|       }); | ||||
|     } | ||||
|     // Minify JSON requests
 | ||||
|     if ( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue