Skip to content

Commit 5255b85

Browse files
committed
fix: return object instead of document
1 parent 676c722 commit 5255b85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/votes/votes.class.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export default class Votes {
88
const which: 'left' | 'right' = data.which;
99
const { user } = params;
1010
poll.contents[which].votes.push(user._id);
11-
return poll.save();
11+
poll.save();
12+
return poll.toObject();
1213
}
1314
return null;
1415
}

0 commit comments

Comments
 (0)