akf-forum/util/admin.js

12 lines
327 B
JavaScript
Raw Normal View History

const mongoose = require("mongoose");
require("dotenv").config();
mongoose.connect(process.env.MONGO_DB_URL, () => console.log("Database is connected"));
2023-05-25 17:47:54 +03:00
const { UserModel } = require("../src/models");
(async () => {
const member = await UserModel.get("0");
member.admin = true;
2022-08-11 03:48:35 +03:00
console.log(await member.save());
})();