mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-05-20 15:49:34 +05:00
feat: pack creating
This commit is contained in:
parent
5be021789b
commit
af7b8a6fea
27 changed files with 677 additions and 130 deletions
22
gui/api/ENDPOINTS.ts
Normal file
22
gui/api/ENDPOINTS.ts
Normal 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];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue