diff --git a/services/adminService.js b/services/adminService.js index 90144dc..1f083a4 100644 --- a/services/adminService.js +++ b/services/adminService.js @@ -1,4 +1,5 @@ const fs = require("node:fs").promises +const path = require("node:path") const jwt = require("jsonwebtoken") const crypto = require("node:crypto") const bcrypt = require("bcryptjs") @@ -130,7 +131,7 @@ async function uploadCape(fileObject, alias = null) { const existing = await userRepository.getTextureByHash(hash) if (existing) { - await fs.unlink(fileObject.path); + await fs.unlink(fileObject.path) throw new DefaultError(409, "Cape already existing.") }