Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Update server dependencies #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"presets": ["backpack-core/babel", "react"],
"plugins": ["transform-react-jsx"]
}
"presets": [
"backpack-core/babel",
"@babel/preset-react"
]
}
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,26 @@
"author": "Florian Kapfenberger <florian@kapfenbgerger.me>",
"license": "MIT",
"dependencies": {
"backpack-core": "^0.7.0",
"body-parser": "^1.18.2",
"dotenv": "^6.0.0",
"express": "^4.16.2",
"express-jwt": "^5.3.0",
"express-rate-limit": "^2.11.0",
"helmet": "^3.9.0",
"joi": "^13.0.2",
"jsonwebtoken": "^8.1.0",
"@hapi/joi": "^17.1.1",
"backpack-core": "^0.8.4",
"body-parser": "^1.19.0",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-jwt": "^5.3.3",
"express-rate-limit": "^5.1.3",
"helmet": "^3.22.0",
"jsonwebtoken": "^8.5.1",
"knex": "^0.14.2",
"lodash": "^4.17.4",
"lodash": "^4.17.15",
"mariasql": "^0.2.6",
"morgan": "^1.9.0",
"morgan": "^1.10.0",
"sha512crypt-node": "^0.1.0"
},
"devDependencies": {
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-react": "^6.24.1",
"husky": "^0.14.3",
"lint-staged": "^7.2.0",
"prettier": "^1.9.2"
"@babel/preset-react": "^7.9.4",
"husky": "^4.2.5",
"lint-staged": "^10.2.2",
"prettier": "^2.0.5"
},
"lint-staged": {
"*.{js,jsx}": [
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/accountController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { isEmpty } from "lodash";
import Account from "../model/account";

import { isAdmin } from "../helpers/authorizationHelper";

class AccountController {
Expand Down
1 change: 0 additions & 1 deletion src/controllers/aliasController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { isEmpty } from "lodash";
import Alias from "../model/alias";

import { isAdmin } from "../helpers/authorizationHelper";

class AliasController {
Expand Down
11 changes: 5 additions & 6 deletions src/controllers/authenticationController.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Joi from "joi";
import { promisify } from "util";

import Joi from "@hapi/joi";
import Account from "../model/account";
import { generateToken } from "../helpers/tokenHelper";
import { isAdmin } from "../helpers/authorizationHelper";

const validate = promisify(Joi.validate);
const emailValidator = Joi.string().email();
const emailValidator = Joi.object({
email: Joi.string().email()
});

class AuthenticationController {
async authenticate(req, res) {
Expand All @@ -18,7 +17,7 @@ class AuthenticationController {

// validate email
try {
await validate(email, emailValidator);
await emailValidator.validateAsync({ email });
} catch (validationError) {
return res.status(422).json({ message: "invalid email" });
}
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/domainController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { isEmpty } from "lodash";
import Domain from "../model/domain";

import { isAdmin } from "../helpers/authorizationHelper";

class DomainController {
Expand Down
1 change: 0 additions & 1 deletion src/controllers/tlspolicyController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { isEmpty } from "lodash";
import TlsPolicy from "../model/tlspolicy";

import { isAdmin } from "../helpers/authorizationHelper";

class TlsPolicyController {
Expand Down