fixed cape upload
This commit is contained in:
parent
086468405a
commit
308c3b5479
@ -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.")
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user