aboutsummaryrefslogtreecommitdiff
path: root/services/votes/votes.class.ts
diff options
context:
space:
mode:
Diffstat (limited to 'services/votes/votes.class.ts')
-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;
}