This commit is contained in:
Akif9748 2023-03-19 17:14:33 +03:00
parent 24cdd86e34
commit da214db047
5 changed files with 1901 additions and 2 deletions

25
.eslintrc.json Normal file
View file

@ -0,0 +1,25 @@
{
// exclude public folder from linting
"ignorePatterns": ["public/"],
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"linebreak-style": [
"error",
"windows"
]
}
}

View file

@ -13,7 +13,7 @@ schema.methods.takeId = async function () {
} }
schema.methods.getLink = function (id = this.id) { schema.methods.getLink = function (id = this.id) {
return "/categories/" + this.id; return "/categories/" + id;
} }
const model = mongoose.model('category', schema); const model = mongoose.model('category', schema);

View file

@ -1,5 +1,5 @@
const mongoose = require("mongoose") const mongoose = require("mongoose")
const { def_theme, limits, email_auth, default_user_state } = require("../config.json"); const { def_theme, limits, default_user_state } = require("../config.json");
const { userEnum } = require("../lib"); const { userEnum } = require("../lib");
const schema = new mongoose.Schema({ const schema = new mongoose.Schema({

1871
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -37,5 +37,8 @@
"node-fetch": "^2.6.7", "node-fetch": "^2.6.7",
"nodemailer": "^6.8.0", "nodemailer": "^6.8.0",
"request-ip": "^3.3.0" "request-ip": "^3.3.0"
},
"devDependencies": {
"eslint": "^8.25.0"
} }
} }