aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-25 09:48:39 +0300
committereug-vs <eug-vs@keemail.me>2020-06-25 09:48:39 +0300
commit2e28a2555119c8958737e84fd2312e9930046242 (patch)
treebbc73f9ee3621ea50784b925ff509d4faf25b02e /models
parentfc9cf3b8f77e9068fa51d614b0d0b120f7bf2440 (diff)
downloadwhich-api-2e28a2555119c8958737e84fd2312e9930046242.tar.gz
feat: change match to enum in voteSchema
Diffstat (limited to 'models')
-rw-r--r--models/votes/vote.schema.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/votes/vote.schema.ts b/models/votes/vote.schema.ts
index 36b38f2..709e8bf 100644
--- a/models/votes/vote.schema.ts
+++ b/models/votes/vote.schema.ts
@@ -16,7 +16,7 @@ export const voteSchema = new Schema({
},
which: {
type: String,
- match: /left|right/g
+ enum: ['left', 'right']
}
}, { timestamps: true });