all-files: implement titles (shows, movies) list

This commit is contained in:
jurgis
2022-12-10 19:47:52 +01:00
parent 75ba458b59
commit 80ba785798
6 changed files with 82 additions and 18 deletions
+5 -9
View File
@@ -1,6 +1,7 @@
import { Controller, Get, Param } from '@nestjs/common';
import ApiResponse from '../Dto/api-response.dto';
import { AllFilesService } from './all-files.service';
import { TitleTypeEnum } from './Enum/title-type.enum';
@Controller('api/all')
export class AllFilesController {
@@ -11,19 +12,14 @@ export class AllFilesController {
return this.allFilesService.getMenu();
}
@Get('titles')
async titles() {
return this.allFilesService.getAllTitles();
}
@Get('show')
getShows() {
return { will: 'show shows list' };
getShows(): Promise<ApiResponse> {
return this.allFilesService.getListOfTitles(TitleTypeEnum.show);
}
@Get('movie')
getMovies() {
return { will: 'show movies list' };
async getMovies(): Promise<ApiResponse> {
return this.allFilesService.getListOfTitles(TitleTypeEnum.movie);
}
@Get('play')