@armi-wave/common 1.11.0 → 1.14.0

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.
@@ -2,6 +2,7 @@ import { NextFunction, Request, Response } from 'express';
2
2
  interface UserPayload {
3
3
  id: string;
4
4
  email: string;
5
+ username: string;
5
6
  }
6
7
  declare global {
7
8
  namespace Express {
@@ -1,7 +1,7 @@
1
1
  import mongoose from 'mongoose';
2
2
  import { PostType } from '../enums/PostType';
3
3
  interface PostAttributes {
4
- idUser: string;
4
+ userId: string;
5
5
  username: string;
6
6
  likes: number;
7
7
  upVotes: number;
@@ -16,7 +16,7 @@ interface PostModel extends mongoose.Model<PostDocument> {
16
16
  build(attrs: PostAttributes): PostDocument;
17
17
  }
18
18
  interface PostDocument extends mongoose.Document {
19
- idUser: string;
19
+ userId: string;
20
20
  username: string;
21
21
  likes: number;
22
22
  upVotes: number;
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const mongoose_1 = __importDefault(require("mongoose"));
7
7
  const postSchema = new mongoose_1.default.Schema({
8
- idUser: {
8
+ userId: {
9
9
  type: String,
10
10
  required: true,
11
11
  },
@@ -132,21 +132,14 @@ const userSchema = new mongoose_1.default.Schema({
132
132
  delete ret.password;
133
133
  delete ret.__v;
134
134
  delete ret._id;
135
- delete ret.followers;
136
- delete ret.following;
137
135
  delete ret.phoneNumber;
138
- delete ret.verified;
139
136
  delete ret.paidPlan;
140
137
  delete ret.savedPosts;
141
138
  delete ret.likedPosts;
142
139
  delete ret.upVotedPosts;
143
140
  delete ret.likedComments;
144
- delete ret.bannedAccounts;
145
141
  delete ret.reportedPosts;
146
142
  delete ret.validReportedPosts;
147
- delete ret.totalLikes;
148
- delete ret.totalUpVotes;
149
- delete ret.totalDownVotes;
150
143
  delete ret.location;
151
144
  delete ret.height;
152
145
  delete ret.weight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armi-wave/common",
3
- "version": "1.11.0",
3
+ "version": "1.14.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",