Skip to content

Commit

Permalink
setting user default privileges to not an admin, adding @types/ws and…
Browse files Browse the repository at this point in the history
… fix url on models
  • Loading branch information
asere committed Aug 29, 2023
1 parent 7eeccf8 commit 5999f09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions BackEnd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@types/mocha": "^9.0.0",
"@types/morgan": "^1.9.3",
"@types/node": "^17.0.5",
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"eslint": "^7.31.0",
Expand Down
2 changes: 1 addition & 1 deletion BackEnd/src/models/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ServerSchema.pre('validate', function (next) {
if (!(this as any).slug) {
(this as any).slugify();
}
(this as any).url = (this as any).author.username + '.' + (this as any).slug + '.' + domain;
(this as any).url = (this as any).slug + '-' + (this as any).username + '.' + domain;
next();
});

Expand Down
2 changes: 1 addition & 1 deletion BackEnd/src/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var UserSchema = new mongoose.Schema({
description: String,
place: String,
goal: String,
admin: { type: Boolean, default: true },
admin: { type: Boolean, default: false },
active: { type: Boolean, default: true },
authorized: { type: Boolean, default: false },
image: String,
Expand Down

0 comments on commit 5999f09

Please sign in to comment.