mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 09:18:25 +03:00
Massive Update to sync with client
This commit is contained in:
@@ -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);
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { CounterDocument } from "tachi-common";
|
||||
import db from "../../src/external/mongo/db";
|
||||
|
||||
const Counters: CounterDocument[] = [
|
||||
{
|
||||
counterName: "users",
|
||||
value: 1,
|
||||
},
|
||||
];
|
||||
|
||||
db.counters.insert(Counters).then(() => {
|
||||
process.exit(0);
|
||||
});
|
||||
Reference in New Issue
Block a user