Skip to content

Commit

Permalink
Cyberleague: [premieroctet#121] add ensureMarketScore function
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Sep 26, 2024
1 parent b99e63e commit c1b975e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion backend/web/server/plugins/cyberleague/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const QuestionCategory = require('../../models/QuestionCategory')
const { isMineForMessage } = require('./message')
const { getConversationPartner } = require('./conversation')
const ExpertiseCategory = require('../../models/ExpertiseCategory')
const { getQuestionsByCategory, computeScoresIfRequired, getCategoryRates } = require('./score')
const { getQuestionsByCategory, computeScoresIfRequired, getCategoryRates, updateMarketScore } = require('./score')
const Conversation = require('../../models/Conversation')
const Score = require('../../models/Score')
const Gain = require('../../models/Gain')
Expand Down Expand Up @@ -346,6 +346,13 @@ const ensureGains = () => {

ensureGains()

//create score with market values
const ensureMarketScore = async () => {
const _category_rates = null
await updateMarketScore(_category_rates)
}

ensureMarketScore()

const preprocessGet = async ({model, fields, id, user, params}) => {
if (model=='loggedUser') {
Expand Down

0 comments on commit c1b975e

Please sign in to comment.