File size: 552 Bytes
3d23b0f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import { FastifyPluginAsync } from 'fastify';
import * as handlers from './handlers';
import * as schemas from './schemas';
import validateUsername from '../../shared/middlewares/validate';
import type { UserQuery } from './types';
const codechefRoutes: FastifyPluginAsync = async (fastify) => {
fastify.get<{ Querystring: UserQuery }>(
'/rating',
{
preHandler: [validateUsername],
schema: schemas.userRatingSchema,
},
handlers.getUserRatingHandler
);
};
export default codechefRoutes;
|