Skip to content

Commit

Permalink
add unverifiedTelegramUsername to user schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Apr 3, 2024
1 parent f03497a commit d8869ed
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ User {
email?: string,
communities?: [Types.ObjectId]
tcaAt?: Date;
unverifiedTelegramUsername?:string;
}
```

Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/models/user.model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('User model', () => {
discordId: '1234',
email: '[email protected]',
communities: [new Types.ObjectId(), new Types.ObjectId()],
unverifiedTelegramUsername: "alex_jane"
};
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@togethercrew.dev/db",
"version": "3.0.32",
"version": "3.0.33",
"description": "All interactions with DB",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/User.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ export interface IUser {
email?: string;
communities?: Types.ObjectId[];
tcaAt?: Date;
unverifiedTelegramUsername?: string;
}

export interface IUserUpdateBody {
email?: string;
communities?: Types.ObjectId[];
tcaAt?: Date;
unverifiedTelegramUsername?: string;
}

export interface UserModel extends Model<IUser> {
Expand Down
3 changes: 3 additions & 0 deletions src/models/schemas/User.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const userSchema = new Schema<IUser, UserModel>(
tcaAt: {
type: Date,
},
unverifiedTelegramUsername: {
type: String
}
},
{ timestamps: true },
);
Expand Down

0 comments on commit d8869ed

Please sign in to comment.