/
gnomdeployer
/
VUZPlus
Обзор
Документация
Войти
/
gnomdeployer
/
VUZPlus
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
client/src/api/admin.api.ts
49 строк
1 KB
unwelcome
rework api, rework directions and digital departments to programms, fix applications
13 май 2025, 19:19
13 май 2025, 19:19
4818e0a
Код
Авторство
О чём код?
import axios from "axios"; import { DEVMODE, API } from "@/helpers/constants"; import { GET_COOKIE } from "@/helpers/functions"; //GET //GET All delegates verification applications export function API_GetAllDelegatesRegistrations() { return new Promise((resolve, reject) => { axios.get(`${API}/auth/delegates/registrations`, { headers: { Authorization: `Bearer ${GET_COOKIE('access_token')}`, } }) .then(response => { if(DEVMODE) console.log('Get all delegates registrations success: ', response); resolve(response); }) .catch(err => { if(DEVMODE) console.log('Get all delegates registrations error: ', err); reject(err); }); }); } //POST //PUT //PUT Update user verification status export function API_UpdateUserVerificationStatus(userID: number, verificationStatus: string) { return new Promise((resolve, reject) => { axios.put(`${API}/auth/users/status?user_id=${userID}&status=${verificationStatus}`, null, { headers: { Authorization: `Bearer ${GET_COOKIE('access_token')}`, } }) .then(response => { if(DEVMODE) console.log('Update user verification status success: ', response); resolve(response); }) .catch(err => { if(DEVMODE) console.log('Update user verification status error: ', err); reject(err); }); }); } //DELETE