mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 15:36:48 +00:00
* fix: support multitenancy in org * fix: register and login working now * fix: changes to migration * fix: migrations run both on sqlite and postgres * fix: remove user flags from fe and be * fix: remove ingestion keys from update * fix: multitenancy support for apdex settings * fix: render ts for users correctly * fix: fix migration to run for new tenants * fix: clean up migrations * fix: address comments * Update pkg/sqlmigration/013_update_organization.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: fix build * fix: force invites with org id * Update pkg/query-service/auth/auth.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: address comments * fix: address comments * fix: provier with their own dialect * fix: update dialects * fix: remove unwanted change * Update pkg/query-service/app/http_handler.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: different files for types --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
31 lines
695 B
TypeScript
31 lines
695 B
TypeScript
import getLocalStorageApi from 'api/browser/localstorage/get';
|
|
import { LOCALSTORAGE } from 'constants/localStorage';
|
|
import { defaultTo } from 'lodash-es';
|
|
|
|
import { IUser } from './types';
|
|
|
|
function getUserDefaults(): IUser {
|
|
const accessJwt = defaultTo(getLocalStorageApi(LOCALSTORAGE.AUTH_TOKEN), '');
|
|
const refreshJwt = defaultTo(
|
|
getLocalStorageApi(LOCALSTORAGE.REFRESH_AUTH_TOKEN),
|
|
'',
|
|
);
|
|
const userId = defaultTo(getLocalStorageApi(LOCALSTORAGE.USER_ID), '');
|
|
|
|
return {
|
|
accessJwt,
|
|
refreshJwt,
|
|
id: userId,
|
|
email: '',
|
|
name: '',
|
|
profilePictureURL: '',
|
|
createdAt: 0,
|
|
organization: '',
|
|
orgId: '',
|
|
role: 'VIEWER',
|
|
groupId: '',
|
|
};
|
|
}
|
|
|
|
export { getUserDefaults };
|