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