mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-30 06:30:40 +03:00
16 lines
327 B
JavaScript
16 lines
327 B
JavaScript
|
const mongoose = require("mongoose");
|
||
|
require("dotenv").config();
|
||
|
|
||
|
mongoose.connect(process.env.MONGO_DB_URL, () => console.log("Database is connected"));
|
||
|
|
||
|
const { UserModel } = require("../models");
|
||
|
(async () => {
|
||
|
|
||
|
const member= await UserModel.get(0);
|
||
|
console.log(member);
|
||
|
member.admin = true;
|
||
|
member.save();
|
||
|
})();
|
||
|
|
||
|
|