Remove unnecessary mongoose in scripts

This commit is contained in:
Matthew Lopez
2024-07-30 17:34:19 -04:00
parent a9fcbcfee8
commit a9505fea12
4 changed files with 1 additions and 14 deletions

View File

@@ -1,6 +1,5 @@
// This should be evaled in the juxtaposition-ui container
require("module-alias/register");
const mongoose = require("mongoose");
const { connect } = require("./src/database");
const { COMMUNITY } = require("./src/models/communities");
const fs = require("fs").promises;
@@ -24,8 +23,6 @@ async function runAsync() {
process.argv[4],
process.argv[5]
);
await mongoose.connection.close();
}
runAsync().then(() => {

View File

@@ -1,5 +1,4 @@
// This should be evaled in the account container
const mongoose = require("mongoose");
const { connect } = require("./dist/database");
const { PNID } = require("./dist/models/pnid");
@@ -18,11 +17,8 @@ async function runAsync() {
await updatePnidAccessLevel(pnid, 3, "dev");
} else {
console.error(`No PNID found for username ${process.argv[1]}.`);
await mongoose.connection.close();
process.exit(2);
process.exit(1);
}
await mongoose.connection.close();
}
runAsync().then(() => {

View File

@@ -1,5 +1,4 @@
// This should be evaled in the account container
const mongoose = require("mongoose");
const { connect } = require("./dist/database");
const { Server } = require("./dist/models/server");
@@ -101,8 +100,6 @@ async function runAsync() {
1,
"0".repeat(64)
);
await mongoose.connection.close();
}
runAsync().then(() => {

View File

@@ -1,5 +1,4 @@
// This should be evaled in the miiverse-api container
const mongoose = require("mongoose");
const { connect } = require("./dist/database");
const { Endpoint } = require("./dist/models/endpoint");
@@ -15,8 +14,6 @@ async function runAsync() {
"portal.olv.pretendo.cc",
"ctr.olv.pretendo.cc"
);
await mongoose.connection.close();
}
runAsync().then(() => {