A Deno-powered backend service for Plants vs. Zombies: MODDED. [Read-only GitHub mirror] docs.pvzm.net
express typescript expressjs plant deno jspvz pvzm game online backend plants-vs-zombies zombie javascript plants modded vs plantsvszombies openapi pvz noads
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

update author to Anon{levelId} for anonymous submissions

Clay 62de0d6b 94f1072b

+5
+5
modules/routes/levels.ts
··· 189 189 const queryResult = dbCtx.db.prepare("SELECT last_insert_rowid() as id").get(); 190 190 const levelId = queryResult ? (queryResult as { id: number }).id : 0; 191 191 192 + if (author === "Anonymous") { 193 + author = `Anon${levelId}`; 194 + dbCtx.db.prepare("UPDATE levels SET author = ? WHERE id = ?").run(author, levelId); 195 + } 196 + 192 197 // store the level binary data 193 198 // @ts-expect-error -- 3 is the only valid version right now but this will change in future 194 199 const levelFilename = `${levelId}.izl${version === 1 ? "" : version}`;