Massive Update to sync with client

This commit is contained in:
zkldi
2021-07-21 04:51:31 +01:00
parent 20fb635791
commit 652333d3b4
23 changed files with 423 additions and 51 deletions
@@ -0,0 +1,24 @@
import db from "../../src/external/mongo/db";
import { Command } from "commander";
import CreateLogCtx from "../../src/lib/logger/logger";
const logger = CreateLogCtx(__filename);
const program = new Command();
program.option("-c, --code <code>", "The code for this invite.");
program.parse(process.argv);
const options = program.opts();
db.invites
.insert({
code: options.code,
createdBy: 1,
consumed: false,
createdOn: Date.now(),
})
.then(() => {
logger.info(`Created invite ${options.code}.`);
process.exit(0);
});