Release Healer Man 0.1.5

This commit is contained in:
phenom
2026-08-18 16:22:19 -04:00
parent f4c9cf356c
commit 55cfd43d66
62 changed files with 3030 additions and 153 deletions
+21
View File
@@ -209,6 +209,27 @@ export function createGameServer(options = {}) {
json(response, 200, gameDatabase.putCloudSave(account.id, body.data));
return;
}
if (url.pathname === "/api/manastorm-config" && request.method === "GET") {
const current = gameDatabase.getManastormConfig();
json(response, 200, {
revision: current.revision,
updatedAt: current.updatedAt,
config: current.config,
});
return;
}
if (url.pathname === "/api/gm/manastorm-config" && request.method === "PUT") {
const account = gameDatabase.authenticate(bearerToken(request));
if (!gameDatabase.isGameMaster(account)) {
console.warn(`Denied Manastorm GM write for ${account.username} (${account.id})`);
throw new GameDatabaseError("Game Master access is required.", 403, "gm_required");
}
const body = await readJson(request, bodyLimit);
const result = gameDatabase.putManastormConfig(account, body.expectedRevision, body.config);
console.info(`Manastorm configuration revision ${result.revision} published by ${account.username}`);
json(response, 200, result);
return;
}
if (url.pathname.startsWith("/api/")) {
json(response, 404, { error: "API route not found.", code: "not_found" });
return;