refactor: Standardize type naming conventions and file casing for course and category types.

This commit is contained in:
JakkrapartXD 2026-01-20 07:13:59 +00:00
parent 6bbbde062a
commit 057f640272
6 changed files with 7 additions and 26 deletions

View file

@ -1,7 +1,7 @@
import { Get, Body, Post, Route, Tags, SuccessResponse, Response, Delete, Controller, Security, Request, Put, Path } from 'tsoa';
import { ValidationError } from '../middleware/errorHandler';
import { CategoryService } from '../services/categories.service';
import { createCategory, createCategoryResponse, deleteCategoryResponse, updateCategory, updateCategoryResponse, listCategoriesResponse } from '../types/Categories.type';
import { createCategory, createCategoryResponse, deleteCategoryResponse, updateCategory, updateCategoryResponse, ListCategoriesResponse } from '../types/categories.type';
@Route('api/categories')
@Tags('Categories')
@ -11,7 +11,7 @@ export class CategoriesController {
@Get()
@SuccessResponse('200', 'Categories fetched successfully')
@Response('401', 'Invalid or expired token')
public async listCategories(): Promise<listCategoriesResponse> {
public async listCategories(): Promise<ListCategoriesResponse> {
return await this.categoryService.listCategories();
}
}

View file

@ -1,6 +1,6 @@
import { Get, Body, Post, Route, Tags, SuccessResponse, Response, Delete, Controller, Security, Request, Put, Path } from 'tsoa';
import { ValidationError } from '../middleware/errorHandler';
import { listCourseResponse } from '../types/Courses.types';
import { listCourseResponse } from '../types/courses.types';
import { CoursesService } from '../services/courses.service';
@Route('api/courses')