Skip to content

Commit

Permalink
fix: handle cost model conversion for epoch number as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki committed Nov 3, 2023
1 parent 68e9876 commit 28ab1cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/epochs/number/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as QueryTypes from '../../../types/queries/epochs.js';
import * as ResponseTypes from '../../../types/responses/epochs.js';
import { getDbSync } from '../../../utils/database.js';
import { handle400Custom, handle404 } from '../../../utils/error-handler.js';
import { sortKeysInObject } from '../../../utils/string-utils.js';
import { costModelsMap } from '../../../utils/cost-models-map.js';
import { validatePositiveInRangeSignedInt } from '../../../utils/validation.js';

async function route(fastify: FastifyInstance) {
Expand Down Expand Up @@ -36,7 +36,7 @@ async function route(fastify: FastifyInstance) {
}

if (rows[0].cost_models) {
rows[0].cost_models = sortKeysInObject(rows[0].cost_models);
rows[0].cost_models = costModelsMap(rows[0].cost_models);
}

return reply.send(rows[0]);
Expand Down

0 comments on commit 28ab1cd

Please sign in to comment.