feat: add plug and organization
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
LoginCredentials,
|
||||
RegisterData,
|
||||
OrganizationCreateData,
|
||||
OrganizationMember,
|
||||
} from "../types/auth.types";
|
||||
|
||||
export const useAuth = () => {
|
||||
@@ -20,7 +21,6 @@ export const useAuth = () => {
|
||||
if (result) {
|
||||
authService.saveAuthData(result.access_token, result.user);
|
||||
|
||||
// Проверяем, есть ли уже организация
|
||||
const orgs = await request(() => authService.getOrganizations());
|
||||
if (orgs && orgs.length > 0) {
|
||||
authService.saveOrganization(orgs[0]);
|
||||
|
||||
Reference in New Issue
Block a user