From 5255b85532f2e2709b31e891a167c1a250a0aa7e Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 23 Jun 2020 02:33:10 +0300 Subject: fix: return object instead of document --- services/votes/votes.class.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'services') 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; } -- cgit v1.2.3