Initial commit

This commit is contained in:
Leo Wen
2025-12-06 16:33:33 -08:00
commit ad5b308873
16 changed files with 1672 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { PrismaClient } from "@prisma/client";
import argon2 from "argon2";
const prisma = new PrismaClient();
let username = Bun.argv[2];
let password = Bun.argv[3];
let priviledge = Bun.argv[4];
try {
let newModerator = await prisma.moderator.create({
data: {
username: username,
password: await argon2.hash(password),
}
});
console.log(`Successfully created new moderator with username: ${username} and id: ${newModerator.id}`);
} catch (e) {
console.error(e);
}