@duvdu-v1/duvdu 1.1.150 → 1.1.152

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.
@@ -25,7 +25,7 @@ const userSchema = new mongoose_1.Schema({
25
25
  password: String,
26
26
  verificationCode: { code: String, expireAt: Date, reason: { type: String, default: null } },
27
27
  isVerified: { type: Boolean, default: false },
28
- refreshTokens: [{ token: { type: String, default: null }, fingerprint: { type: String, default: null }, clientType: { type: String, default: null } }],
28
+ refreshTokens: [{ token: { type: String, default: null }, fingerprint: { type: String, default: null }, clientType: { type: String, default: null }, userAgent: { type: String, default: null } }],
29
29
  profileImage: { type: String, default: 'defaults/profile.jpg' },
30
30
  coverImage: { type: String, default: null },
31
31
  location: { lat: { type: Number, default: null }, lng: { type: Number, default: null } },
@@ -16,8 +16,8 @@ const projectViews_model_1 = require("../models/projectViews.model");
16
16
  const User_model_1 = require("../models/User.model");
17
17
  const incrementProjectsView = (userId, projectId, lang) => __awaiter(void 0, void 0, void 0, function* () {
18
18
  try {
19
- const user = yield User_model_1.Users.findById(userId);
20
- const project = yield allProjects_model_1.Project.findOne({ project: projectId });
19
+ const user = (yield User_model_1.Users.findById(userId));
20
+ const project = yield allProjects_model_1.Project.findOne({ 'project.type': projectId });
21
21
  if (!user)
22
22
  throw new notfound_error_1.NotFound({ en: 'user not found', ar: 'لم يتم العثور على المستخدم' }, lang);
23
23
  user.projectsView += 1;
@@ -57,6 +57,7 @@ export interface Iuser {
57
57
  fingerprint: string;
58
58
  clientType: string;
59
59
  token: string;
60
+ userAgent: string;
60
61
  }[];
61
62
  profileImage?: string;
62
63
  coverImage?: string;
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
- {
2
- "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.150",
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
- "fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
13
- "pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
14
- "lint": "eslint .",
15
- "lint:fix": "eslint --fix .",
16
- "format": "prettier --write ."
17
- },
18
- "keywords": [],
19
- "author": "motemed khaled",
20
- "license": "ISC",
21
- "dependencies": {
22
- "@duvdu-v1/duvdu": "^1.1.116",
23
- "@types/express": "^4.17.21",
24
- "@types/express-session": "^1.18.0",
25
- "@types/jsonwebtoken": "^9.0.5",
26
- "@types/multer": "^1.4.11",
27
- "@types/node": "^20.11.0",
28
- "@typescript-eslint/eslint-plugin": "^6.19.0",
29
- "@typescript-eslint/parser": "^6.19.0",
30
- "aws-sdk": "^2.1595.0",
31
- "connect-redis": "^7.1.1",
32
- "express": "^4.18.2",
33
- "express-async-errors": "^3.1.1",
34
- "express-session": "^1.18.0",
35
- "express-validator": "^7.0.1",
36
- "jsonwebtoken": "^9.0.2",
37
- "mongoose": "^8.0.4",
38
- "multer": "^1.4.5-lts.1",
39
- "node-nats-streaming": "^0.3.2",
40
- "redis": "^4.6.13",
41
- "rimraf": "^5.0.5",
42
- "typescript": "^5.3.3",
43
- "uuid": "^9.0.1",
44
- "winston": "^3.13.0",
45
- "winston-daily-rotate-file": "^5.0.0"
46
- },
47
- "devDependencies": {
48
- "@types/uuid": "^9.0.8",
49
- "del-cli": "^5.1.0",
50
- "eslint": "^8.56.0",
51
- "eslint-config-prettier": "^9.1.0",
52
- "eslint-plugin-import": "^2.29.1",
53
- "eslint-plugin-prettier": "^5.1.3",
54
- "prettier": "^3.2.4"
55
- },
56
- "description": ""
57
- }
1
+ {
2
+ "name": "@duvdu-v1/duvdu",
3
+ "version": "1.1.152",
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
+ "fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
13
+ "pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
14
+ "lint": "eslint .",
15
+ "lint:fix": "eslint --fix .",
16
+ "format": "prettier --write ."
17
+ },
18
+ "keywords": [],
19
+ "author": "motemed khaled",
20
+ "license": "ISC",
21
+ "dependencies": {
22
+ "@duvdu-v1/duvdu": "^1.1.116",
23
+ "@types/express": "^4.17.21",
24
+ "@types/express-session": "^1.18.0",
25
+ "@types/jsonwebtoken": "^9.0.5",
26
+ "@types/multer": "^1.4.11",
27
+ "@types/node": "^20.11.0",
28
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
29
+ "@typescript-eslint/parser": "^6.19.0",
30
+ "aws-sdk": "^2.1595.0",
31
+ "connect-redis": "^7.1.1",
32
+ "express": "^4.18.2",
33
+ "express-async-errors": "^3.1.1",
34
+ "express-session": "^1.18.0",
35
+ "express-validator": "^7.0.1",
36
+ "jsonwebtoken": "^9.0.2",
37
+ "mongoose": "^8.0.4",
38
+ "multer": "^1.4.5-lts.1",
39
+ "node-nats-streaming": "^0.3.2",
40
+ "redis": "^4.6.13",
41
+ "rimraf": "^5.0.5",
42
+ "typescript": "^5.3.3",
43
+ "uuid": "^9.0.1",
44
+ "winston": "^3.13.0",
45
+ "winston-daily-rotate-file": "^5.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/uuid": "^9.0.8",
49
+ "del-cli": "^5.1.0",
50
+ "eslint": "^8.56.0",
51
+ "eslint-config-prettier": "^9.1.0",
52
+ "eslint-plugin-import": "^2.29.1",
53
+ "eslint-plugin-prettier": "^5.1.3",
54
+ "prettier": "^3.2.4"
55
+ },
56
+ "description": ""
57
+ }