diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-23 02:33:10 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-23 02:33:10 +0300 |
commit | 5255b85532f2e2709b31e891a167c1a250a0aa7e (patch) | |
tree | 4c2b712d37139eb922020ca47c37a4823e61c97c | |
parent | 676c722a994a214c182bcf26b80eab09ebf9f61e (diff) | |
download | which-api-5255b85532f2e2709b31e891a167c1a250a0aa7e.tar.gz |
fix: return object instead of document
-rw-r--r-- | services/votes/votes.class.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/votes/votes.class.ts b/services/votes/votes.class.ts index 0490b7e..6b9181b 100644 --- a/services/votes/votes.class.ts +++ b/services/votes/votes.class.ts @@ -8,7 +8,8 @@ export default class Votes { const which: 'left' | 'right' = data.which; const { user } = params; poll.contents[which].votes.push(user._id); - return poll.save(); + poll.save(); + return poll.toObject(); } return null; } |