Skip to content

Commit

Permalink
chore: updates mongoose to latest and fixes register and login commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcsapo committed Mar 13, 2022
1 parent bb2c5a7 commit cef6793
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/deploy-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import inquirer from "inquirer";
import ora from "ora";

export default async function (cli) {
const spinner = ora().start();
const spinner = ora();

const { username, password } = await inquirer.prompt([
{
Expand Down
2 changes: 1 addition & 1 deletion bin/deploy-register.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import inquirer from "inquirer";
import ora from "ora";

export default async function (cli) {
const spinner = ora().start();
const spinner = ora();

const { username, password } = await inquirer.prompt([
{
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function (cli, spinner) {
spinner.text = "Starting up deploy.sh server";

spinner.text = "Connecting to mongo";
await mongoose.connect(cli.mongo, { useMongoClient: true });
await mongoose.connect(cli.mongo);

spinner.text = "Starting existing applications";
const deployments = await Deployment.start({});
Expand Down
2 changes: 1 addition & 1 deletion lib/models/deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Deployment {
username: user.username,
});

await deployment.remove();
await deployment.deleteOne();

await Request.del({
subdomain: deployment.subdomain,
Expand Down
2 changes: 1 addition & 1 deletion lib/models/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Request {
* @return {Promise}
*/
static async del({ subdomain }) {
return await RequestModel.remove({
return await RequestModel.deleteMany({
subdomain,
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"formidable": "^2.0.1",
"inquirer": "^8.2.1",
"moment": "^2.29.1",
"mongoose": "^4.11.6",
"mongoose": "^6.2.6",
"opn": "^6.0.0",
"ora": "^6.1.0",
"tar": "^6.1.11",
Expand Down

0 comments on commit cef6793

Please sign in to comment.