feat: pack creating

This commit is contained in:
Kentai Radiquum 2025-05-05 01:33:58 +05:00
parent 5be021789b
commit af7b8a6fea
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
27 changed files with 677 additions and 130 deletions

22
gui/api/ENDPOINTS.ts Normal file
View file

@ -0,0 +1,22 @@
const API = process.env.NEXT_PUBLIC_API_URL;
export const ENDPOINTS = {
createPack: `${API}/pack/new`,
getAllPacks: `${API}/pack/all`,
};
type PACK_IMG_ENDPOINTS = {
getPackImage: string;
editPackImage: string;
};
export const PACK_IMG_ENDPOINTS = function (
endpoint: keyof PACK_IMG_ENDPOINTS,
id: string
) {
const _endpoints = {
getPackImage: `${API}/pack/${id}/image`,
editPackImage: `${API}/pack/${id}/image/edit`,
};
return _endpoints[endpoint];
};