mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-25 13:00:41 +03:00
12 lines
No EOL
323 B
JavaScript
12 lines
No EOL
323 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");
|
|
member.admin = true;
|
|
console.log(await member.save());
|
|
})(); |