fixed cape upload

This commit is contained in:
Gilles Lazures 2026-01-18 23:34:40 +01:00
parent 086468405a
commit 308c3b5479

View File

@ -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.")
}