refactor: enforce setAuthToken to strictly require a token, add /notes to gitignore, and include logo asset.
This commit is contained in:
@@ -281,12 +281,8 @@ export const listTenants = async (): Promise<TenantSnippet[]> => {
|
||||
return Array.isArray(data?.tenants) ? data.tenants : [];
|
||||
};
|
||||
|
||||
export const setAuthToken = (token?: string | null) => {
|
||||
if (token) {
|
||||
api.defaults.headers.common.Authorization = `Bearer ${token}`;
|
||||
} else {
|
||||
delete api.defaults.headers.common.Authorization;
|
||||
}
|
||||
export const setAuthToken = (token: string) => {
|
||||
api.defaults.headers.common.Authorization = `Bearer ${token}`;
|
||||
};
|
||||
|
||||
export const clearAuthToken = () => {
|
||||
|
||||
Reference in New Issue
Block a user