Rename deleteGlobalCape to deleteCape
Refactored the function and route handler from deleteGlobalCape to deleteCape for consistency and clarity in naming. Updated all references accordingly.
This commit is contained in:
parent
bfad2a39c1
commit
5b81f57adb
@ -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)
|
||||
})
|
||||
|
||||
|
||||
@ -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,
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user