From 5b81f57adbb7c25e53c999194147329f8074001d Mon Sep 17 00:00:00 2001 From: azures04 Date: Mon, 5 Jan 2026 05:07:53 +0100 Subject: [PATCH] Rename deleteGlobalCape to deleteCape Refactored the function and route handler from deleteGlobalCape to deleteCape for consistency and clarity in naming. Updated all references accordingly. --- routes/admin/cosmetics/capes.js | 2 +- services/adminService.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/admin/cosmetics/capes.js b/routes/admin/cosmetics/capes.js index 4d75e51..683167a 100644 --- a/routes/admin/cosmetics/capes.js +++ b/routes/admin/cosmetics/capes.js @@ -13,7 +13,7 @@ router.post("/upload", adminService.hasPermission("UPLOAD_CAPE"), upload.single( }) router.delete("/:hash", adminService.hasPermission("DELETE_CAPES"), async (req, res) => { - const result = await userService.deleteGlobalCape(req.params.hash) + const result = await userService.deleteCape(req.params.hash) res.status(200).json(result) }) diff --git a/services/adminService.js b/services/adminService.js index fbf6237..3e8dbce 100644 --- a/services/adminService.js +++ b/services/adminService.js @@ -125,7 +125,7 @@ async function uploadCape(fileObject, alias = null) { return { hash, url: textureUrl } } -async function deleteGlobalCape(hash) { +async function deleteCape(hash) { const success = await userRepository.deleteTexture(hash) if (!success) throw new DefaultError(404, "Cape not found.") @@ -145,7 +145,7 @@ module.exports = { grantPermission, revokePermission, checkAdminAccess, - deleteGlobalCape, + deleteCape, logPlayerAction, changeAdminPassword, } \ No newline at end of file