diff --git a/src/routes/governance/dreps/drep-id/delegators.ts b/src/routes/governance/dreps/drep-id/delegators.ts index 9246212f..e53c18fe 100644 --- a/src/routes/governance/dreps/drep-id/delegators.ts +++ b/src/routes/governance/dreps/drep-id/delegators.ts @@ -3,14 +3,13 @@ import * as QueryTypes from '../../../../types/queries/governance.js'; import * as ResponseTypes from '../../../../types/responses/governance.js'; import { getDbSync } from '../../../../utils/database.js'; import { SQLQuery } from '../../../../sql/index.js'; -//import { getSchemaForEndpoint } from '@blockfrost/openapi'; +import { getSchemaForEndpoint } from '@blockfrost/openapi'; async function route(fastify: FastifyInstance) { fastify.route({ url: '/governance/dreps/:drep_id/delegators', method: 'GET', - // TODO: SCHEMA - // schema: getSchemaForEndpoint('/governance/dreps/{drep_id}/delegators'), + schema: getSchemaForEndpoint('/governance/dreps/{drep_id}/delegators'), handler: async (request: FastifyRequest, reply) => { const clientDbSync = await getDbSync(fastify); diff --git a/src/routes/governance/dreps/drep-id/updates.ts b/src/routes/governance/dreps/drep-id/updates.ts index 3e13ca1a..2dfdab50 100644 --- a/src/routes/governance/dreps/drep-id/updates.ts +++ b/src/routes/governance/dreps/drep-id/updates.ts @@ -3,14 +3,13 @@ import * as QueryTypes from '../../../../types/queries/governance.js'; import * as ResponseTypes from '../../../../types/responses/governance.js'; import { getDbSync } from '../../../../utils/database.js'; import { SQLQuery } from '../../../../sql/index.js'; -//import { getSchemaForEndpoint } from '@blockfrost/openapi'; +import { getSchemaForEndpoint } from '@blockfrost/openapi'; async function route(fastify: FastifyInstance) { fastify.route({ url: '/governance/dreps/:drep_id/updates', method: 'GET', - // TODO: SCHEMA - // schema: getSchemaForEndpoint('/governance/dreps/{drep_id}/updates'), + schema: getSchemaForEndpoint('/governance/dreps/{drep_id}/updates'), handler: async (request: FastifyRequest, reply) => { const clientDbSync = await getDbSync(fastify); @@ -18,7 +17,7 @@ async function route(fastify: FastifyInstance) { const { rows }: { rows: ResponseTypes.DRepsDrepIDUpdates } = await clientDbSync.query( SQLQuery.get('governance_dreps_drep_id_updates'), - [request.query.order, request.query.count, request.query.page, request.params.drep_id], + [(request.query.order, request.query.count, request.query.page, request.params.drep_id)], ); clientDbSync.release();