Skip to content

Commit

Permalink
#fix: thuanvv fix response routes-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
VanThuan76 committed Jan 10, 2025
1 parent 68ba11c commit c13b880
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/web/routes/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function componentRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['sections'],
tags: ['components'],
},
async handler(
req: FastifyRequest<{ Body: GetBySectionQuery }>,
Expand Down
2 changes: 1 addition & 1 deletion src/web/routes/document-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function documentTypeRoutes(fastify: FastifyRouteInstance)
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['sections'],
tags: ['document-types'],
},
async handler(
req: FastifyRequest<{ Body: ListDocumentTypesQuery }>,
Expand Down
8 changes: 4 additions & 4 deletions src/web/routes/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default async function documentRoutes(fastify: FastifyRouteInstance) {
type: 'object',
properties: {
language: { type: 'string', description: 'Language code (e.g., vi, en, etc.)' },
section_id: { type: 'string', description: 'ID of pages database' }
document_type_id: { type: 'string', description: 'ID of pages database' }
},
required: ['language', 'section_id'],
required: ['language', 'document_type_id'],
},
response: {
200: {
Expand Down Expand Up @@ -52,7 +52,7 @@ export default async function documentRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['sections'],
tags: ['documents'],
},
async handler(
req: FastifyRequest<{ Body: GetByDocumentTypeQuery }>,
Expand Down Expand Up @@ -132,7 +132,7 @@ export default async function documentRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['sections'],
tags: ['documents'],
},
async handler(
req: FastifyRequest<{ Body: GetByIdQuery }>,
Expand Down
2 changes: 1 addition & 1 deletion src/web/routes/feedbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default async function feedbackRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['classes'],
tags: ['feedbacks'],
},
async handler(
req: FastifyRequest<{ Body: ListFeedbacksQuery }>,
Expand Down
2 changes: 1 addition & 1 deletion src/web/routes/lecturers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function lecturerRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['classes'],
tags: ['lecturers'],
},
async handler(
req: FastifyRequest<{ Body: ListLecturersQuery }>,
Expand Down
6 changes: 3 additions & 3 deletions src/web/routes/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default async function newsRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['classes'],
tags: ['news'],
},
async handler(
req: FastifyRequest<{ Body: GetRelatedQuery }>,
Expand Down Expand Up @@ -154,7 +154,7 @@ export default async function newsRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['classes'],
tags: ['news'],
},
async handler(
req: FastifyRequest<{ Body: GetByCategoryQuery }>,
Expand Down Expand Up @@ -238,7 +238,7 @@ export default async function newsRoutes(fastify: FastifyRouteInstance) {
},
400: { $ref: 'ExceptionResponse#' },
},
tags: ['classes'],
tags: ['news'],
},
async handler(
req: FastifyRequest<{ Body: GetBySlugQuery }>,
Expand Down

0 comments on commit c13b880

Please sign in to comment.