@duvdu-v1/duvdu 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,9 @@ const auth = (modelName) => ((req, res, next) => __awaiter(void 0, void 0, void
27
27
  if (!user) {
28
28
  throw new unauthenticated_error_1.UnauthenticatedError();
29
29
  }
30
+ if (!user.isVerified) {
31
+ throw new unauthenticated_error_1.UnauthenticatedError('pleas verify your self first');
32
+ }
30
33
  if (user.isBlocked) {
31
34
  throw new generic_error_1.GenericError('the users access is denied due to their blocked status.');
32
35
  }
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "@duvdu-v1/duvdu",
3
- "version": "1.0.23",
4
- "main": "./build/index.js",
5
- "types": "./build/index.d.ts",
6
- "files": [
7
- "build/**/*"
8
- ],
9
- "scripts": {
10
- "clean": "rimraf ./build",
11
- "build": "npm run clean && tsc",
12
- "pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
13
- "lint": "eslint .",
14
- "lint:fix": "eslint --fix .",
15
- "format": "prettier --write ."
16
- },
17
- "keywords": [],
18
- "author": "motemed khaled",
19
- "license": "ISC",
20
- "dependencies": {
21
- "@types/express": "^4.17.21",
22
- "@types/jsonwebtoken": "^9.0.5",
23
- "@types/multer": "^1.4.11",
24
- "@types/node": "^20.11.0",
25
- "@typescript-eslint/eslint-plugin": "^6.19.0",
26
- "@typescript-eslint/parser": "^6.19.0",
27
- "express": "^4.18.2",
28
- "express-async-errors": "^3.1.1",
29
- "express-validator": "^7.0.1",
30
- "jsonwebtoken": "^9.0.2",
31
- "mongoose": "^8.0.4",
32
- "multer": "^1.4.5-lts.1",
33
- "node-nats-streaming": "^0.3.2",
34
- "rimraf": "^5.0.5",
35
- "typescript": "^5.3.3"
36
- },
37
- "devDependencies": {
38
- "del-cli": "^5.1.0",
39
- "eslint": "^8.56.0",
40
- "eslint-config-prettier": "^9.1.0",
41
- "eslint-plugin-import": "^2.29.1",
42
- "eslint-plugin-prettier": "^5.1.3",
43
- "prettier": "^3.2.4"
44
- },
45
- "description": ""
46
- }
1
+ {
2
+ "name": "@duvdu-v1/duvdu",
3
+ "version": "1.0.24",
4
+ "main": "./build/index.js",
5
+ "types": "./build/index.d.ts",
6
+ "files": [
7
+ "build/**/*"
8
+ ],
9
+ "scripts": {
10
+ "clean": "rimraf ./build",
11
+ "build": "npm run clean && tsc",
12
+ "pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
13
+ "lint": "eslint .",
14
+ "lint:fix": "eslint --fix .",
15
+ "format": "prettier --write ."
16
+ },
17
+ "keywords": [],
18
+ "author": "motemed khaled",
19
+ "license": "ISC",
20
+ "dependencies": {
21
+ "@types/express": "^4.17.21",
22
+ "@types/jsonwebtoken": "^9.0.5",
23
+ "@types/multer": "^1.4.11",
24
+ "@types/node": "^20.11.0",
25
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
26
+ "@typescript-eslint/parser": "^6.19.0",
27
+ "express": "^4.18.2",
28
+ "express-async-errors": "^3.1.1",
29
+ "express-validator": "^7.0.1",
30
+ "jsonwebtoken": "^9.0.2",
31
+ "mongoose": "^8.0.4",
32
+ "multer": "^1.4.5-lts.1",
33
+ "node-nats-streaming": "^0.3.2",
34
+ "rimraf": "^5.0.5",
35
+ "typescript": "^5.3.3"
36
+ },
37
+ "devDependencies": {
38
+ "del-cli": "^5.1.0",
39
+ "eslint": "^8.56.0",
40
+ "eslint-config-prettier": "^9.1.0",
41
+ "eslint-plugin-import": "^2.29.1",
42
+ "eslint-plugin-prettier": "^5.1.3",
43
+ "prettier": "^3.2.4"
44
+ },
45
+ "description": ""
46
+ }