feat: multiple mod deletion

This commit is contained in:
Kentai Radiquum 2025-05-06 06:17:04 +05:00
parent 34df17d4dd
commit 01cef9a6ea
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 96 additions and 3 deletions

View file

@ -15,6 +15,7 @@ type _PACKS_ENDPOINT = {
type _MOD_ENDPOINT = {
addMod: string;
deleteMod: string;
deleteModBulk: string;
};
export const PACK_ENDPOINT = (endpoint: keyof _PACK_ENDPOINT, id: string) => {
@ -68,6 +69,7 @@ export const MOD_ENDPOINT = (
const _endpoints = {
addMod: `${API}/pack/${id}/mod/add`,
deleteMod: `${API}/pack/${id}/mod/${slug}/delete`,
deleteModBulk: `${API}/pack/${id}/mods/delete`,
};
return _endpoints[endpoint];
};