mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-28 01:48:11 +03:00
27 lines
517 B
TypeScript
27 lines
517 B
TypeScript
import { CounterDocument } from "tachi-common";
|
|
import db from "external/mongo/db";
|
|
|
|
(async () => {
|
|
const uscSongCount = await db.songs.usc.find({});
|
|
const bmsSongCount = await db.songs.bms.find({});
|
|
|
|
const Counters: CounterDocument[] = [
|
|
{
|
|
counterName: "users",
|
|
value: 2,
|
|
},
|
|
{
|
|
counterName: "usc-song-id",
|
|
value: uscSongCount.length + 1,
|
|
},
|
|
{
|
|
counterName: "bms-song-id",
|
|
value: bmsSongCount.length + 1,
|
|
},
|
|
];
|
|
|
|
db.counters.insert(Counters).then(() => {
|
|
process.exit(0);
|
|
});
|
|
})();
|