aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-23 02:33:10 +0300
committereug-vs <eug-vs@keemail.me>2020-06-23 02:33:10 +0300
commit5255b85532f2e2709b31e891a167c1a250a0aa7e (patch)
tree4c2b712d37139eb922020ca47c37a4823e61c97c /services
parent676c722a994a214c182bcf26b80eab09ebf9f61e (diff)
downloadwhich-api-5255b85532f2e2709b31e891a167c1a250a0aa7e.tar.gz
fix: return object instead of document
Diffstat (limited to 'services')
-rw-r--r--services/votes/votes.class.ts3
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;
}