Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

convert all ids to strings #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/controllers/syncController.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const config = require('config')
const logger = require('../util/logger')
const _ = require('lodash')
// const moment = require('moment')
const { slice, union, toString, toNumber, remove } = require('lodash')
const challengeSyncStatusService = require('../services/challengeSyncStatusService')
Expand Down Expand Up @@ -75,11 +76,11 @@ async function queueChallenges (filter) {
let queuedCount = 0

// get active challenges from v4
const { ids: v4IdArray } = await syncService.getV4ChallengeIds(filter)
const v4IdArray = _.map((await syncService.getV4ChallengeIds(filter)).ids, id => _.toNumber(id))
// console.log('v4', v4IdArray)
// logger.debug(`v4 Array ${v4IdArray}`)
// get active challenges from v5
const { ids: v5IdArray } = await syncService.getV5LegacyChallengeIds(filter)
const v5IdArray = _.map((await syncService.getV5LegacyChallengeIds(filter)).ids, id => _.toNumber(id))
// logger.debug(`v5 Array ${v5IdArray}`)

// combine arrays, return unique
Expand Down