refactor: Standardize type naming conventions and file casing for course and category types.
This commit is contained in:
parent
6bbbde062a
commit
057f640272
6 changed files with 7 additions and 26 deletions
|
|
@ -3,11 +3,11 @@ import { Prisma } from '@prisma/client';
|
|||
import { config } from '../config';
|
||||
import { logger } from '../config/logger';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { createCategory, createCategoryResponse, deleteCategoryResponse, updateCategory, updateCategoryResponse, listCategoriesResponse, Category } from '../types/Categories.type';
|
||||
import { createCategory, createCategoryResponse, deleteCategoryResponse, updateCategory, updateCategoryResponse, ListCategoriesResponse, Category } from '../types/categories.type';
|
||||
import { UnauthorizedError, ValidationError, ForbiddenError } from '../middleware/errorHandler';
|
||||
|
||||
export class CategoryService {
|
||||
async listCategories(): Promise<listCategoriesResponse> {
|
||||
async listCategories(): Promise<ListCategoriesResponse> {
|
||||
try {
|
||||
const categories = await prisma.category.findMany();
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { prisma } from '../config/database';
|
|||
import { Prisma } from '@prisma/client';
|
||||
import { config } from '../config';
|
||||
import { logger } from '../config/logger';
|
||||
import { listCourseResponse, getCourseResponse } from '../types/Courses.types';
|
||||
import { listCourseResponse, getCourseResponse } from '../types/courses.types';
|
||||
import { UnauthorizedError, ValidationError, ForbiddenError } from '../middleware/errorHandler';
|
||||
|
||||
export class CoursesService {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue