diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-10-09 00:30:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 00:30:13 +0300 |
commit | afd2f44d3fd814953ff850ac3c5aec1acd9d8da1 (patch) | |
tree | dd667b1e0677c80c55cadf1e9ccdc6c8e01e1d64 | |
parent | 1229c5a4c76411617dc8eb8575f26bc35afb92b2 (diff) | |
parent | 8784f3ce54fd2361af4d3b2b71d43aa543884c93 (diff) | |
download | which-api-afd2f44d3fd814953ff850ac3c5aec1acd9d8da1.tar.gz |
Merge pull request #23 from which-ecosystem/feat/poll-description
Add description to Poll model
-rw-r--r-- | models/polls/poll.schema.ts | 4 | ||||
-rw-r--r-- | package-lock.json | 6 | ||||
-rw-r--r-- | package.json | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 3a57c28..dc52c12 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -11,6 +11,7 @@ export interface PollSchema extends Document { }; createdAt: Date; authorId: string; + description: string; vote: (userId: string, which: 'left' | 'right') => PollSchema; } @@ -26,6 +27,7 @@ export const pollSchema = new Schema({ authorId: { type: Types.ObjectId, ref: 'User' - } + }, + description: String }, { timestamps: true }); diff --git a/package-lock.json b/package-lock.json index 05eeeba..fd0ec8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3248,9 +3248,9 @@ } }, "which-types": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/which-types/-/which-types-1.6.1.tgz", - "integrity": "sha512-uTCrp6+rbU48kyT9Z6upVo9CgGmiR50zFSwzDik8slE8oZ+0FC9SBEfJlfgADX/rFJVbIe8Vxsw4BsSxlL5Lsw==" + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/which-types/-/which-types-1.6.2.tgz", + "integrity": "sha512-+OAaJtZsqJab9YohByErzVqxWTsl/JvZ6AVpz7a0WrPEQHapv0aoA0RZIu1zrfSBFhAQLSJmw4fyvfqUvViO5g==" }, "word-wrap": { "version": "1.2.3", diff --git a/package.json b/package.json index 99a71bd..5292bff 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "ts-node": "^8.10.2", "typescript": "^3.9.5", "uuid": "^8.3.0", - "which-types": "^1.6.1" + "which-types": "^1.6.2" }, "repository": { "type": "git", |