feat: add plug and organization

This commit is contained in:
2026-06-12 19:25:23 +03:00
parent 444bc05f9d
commit d348e0c347
8 changed files with 832 additions and 31 deletions
+1 -1
View File
@@ -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]);