Update Healer Man server
This commit is contained in:
1 parent
3e30af4c98
commit
97ee0c13f9
25 files changed
+576
-179
No files matched your search
@@ -104,7 +104,7 @@ export function createDungeonReportRepository(database, { isGameMaster, ErrorTyp
|
||||
saveRandomizedCreatureReadiness(account, input) {
|
||||
if (!isGameMaster(account)) throw new ErrorType("Game Master access is required.", 403, "gm_required");
|
||||
if (input?.dungeonId !== "randomized-bite-sized-stormwind-stockade"
|
||||
|| typeof input?.creatureKey !== "string" || !input.creatureKey.startsWith("stormwind-stockade:")
|
||||
|| typeof input?.creatureKey !== "string" || !/^(wow|rom):(mob|boss):[1-9][0-9]*$/.test(input.creatureKey)
|
||||
|| input.creatureKey.length > 256 || typeof input?.creatureName !== "string"
|
||||
|| !input.creatureName.trim() || input.creatureName.length > 128
|
||||
|| !["mob", "boss"].includes(input.creatureKind)) {
|
||||
|
||||
@@ -104,7 +104,7 @@ test("persists randomized mob and boss readiness and requires a server-authentic
|
||||
const gm = (await database.register("Phenom", "readiness-admin")).account;
|
||||
const player = (await database.register("ReadinessPlayer", "readiness-player")).account;
|
||||
const creature = {
|
||||
creatureKey: "stormwind-stockade:entity-1711",
|
||||
creatureKey: "wow:mob:3868",
|
||||
dungeonId: "randomized-bite-sized-stormwind-stockade",
|
||||
creatureName: "Defias Convict",
|
||||
creatureKind: "mob",
|
||||
@@ -140,7 +140,7 @@ test("serves public reports and GM-only status API with shelved modes disabled",
|
||||
const labels = await (await fetch(`${origin}/api/boss-testing/reviews`)).json();
|
||||
assert.equal(labels.reviews[0].status, "ready");
|
||||
const gm = await runtime.database.register("Phenom", "report-admin");
|
||||
const creature = { creatureKey: "stormwind-stockade:entity-1711", dungeonId: "randomized-bite-sized-stormwind-stockade",
|
||||
const creature = { creatureKey: "wow:mob:3868", dungeonId: "randomized-bite-sized-stormwind-stockade",
|
||||
creatureName: "Defias Convict", creatureKind: "mob", status: "ready" };
|
||||
const playerDenied = await fetch(`${origin}/api/gm/randomized-creature-readiness`, { method: "PUT",
|
||||
headers: { "Content-Type": "application/json", Authorization: `Bearer ${player.token}` }, body: JSON.stringify(creature) });
|
||||
|
||||
Reference in new issue
Block a user