Skip to content

Commit 7a3e63f

Browse files
committed
fix: FIX issue 469, add correct path
1 parent 4a992f7 commit 7a3e63f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routes/api/internal/cron.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (app) {
77
const Vote = models.Vote;
88
const TopicVote = models.TopicVote;
99
const emailLib = app.get('email');
10-
const topicLib = require('../topic')(app);
10+
const voteService = require('../../../services/vote')(app);
1111
const moment = require('moment');
1212

1313
const getTopicMembers = async (voteId) => {
@@ -98,7 +98,7 @@ module.exports = function (app) {
9898

9999
votes.forEach(async vote => {
100100
const users = await getTopicMembers(vote.id);
101-
const voteResult = await topicLib.getVoteResults(vote.id);
101+
const voteResult = await voteService.getVoteResults(vote.id);
102102
vote.votersCount = 0;
103103
if (voteResult.length) {
104104
vote.votersCount = voteResult[0].votersCount;

0 commit comments

Comments
 (0)