feat: initial admin panel

This commit is contained in:
2026-02-19 22:13:11 +03:30
parent 70efff0dfd
commit 9aff48019d
50 changed files with 9604 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
import { apiClient } from './client';
import { LoginCredentials, LoginResponse } from '@/types/auth';
export const authApi = {
login: async (credentials: LoginCredentials): Promise<LoginResponse> => {
const formData = new FormData();
formData.append('auth', credentials.auth);
formData.append('password', credentials.password);
formData.append('package_name', credentials.package_name);
return apiClient.post<LoginResponse>('/auth/login', formData);
},
logout: async (token: string): Promise<void> => {
return apiClient.post('/auth/logout', {}, token);
},
getProfile: async (token: string): Promise<any> => {
return apiClient.get('/auth/profile', token);
},
};