Add skin upload and texture management endpoints

Introduces endpoints and logic for uploading Minecraft skins via file or URL, storing textures, and managing player skins. Adds new repository and service methods for texture registration and retrieval, updates authorization handling, and uses process.cwd() for data paths. Also includes static serving of textures and rate limiting for skin uploads.
This commit is contained in:
2025-12-28 07:49:31 +01:00
parent 5dd1de1521
commit 1fe46a03fd
8 changed files with 252 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
const fs = require("node:fs")
const path = require("node:path")
const crypto = require("node:crypto")
const keysRoot = path.join(__dirname, "..", "data", "keys")
const keysRoot = path.join(process.cwd(), "data", "keys")
const keysList = ["authenticationKeys", "profilePropertyKeys", "playerCertificateKeys"]
function generateKeysPair() {

View File

@@ -86,6 +86,6 @@ function stripColors(string) {
return string.replace(/\x1B\[[0-9;]*[mK]/g, "")
}
const logger = createLogger(path.join(__dirname, ".."))
const logger = createLogger(process.cwd())
module.exports = logger