diff --git a/backend/services/entryService.js b/backend/services/entryService.js index 103014b..f3c997c 100644 --- a/backend/services/entryService.js +++ b/backend/services/entryService.js @@ -87,7 +87,7 @@ class EntryService { { model: Cast, as: 'credits', where: { cast_type: 'cast' }, - order: [['order', 'ASC']], + order: [['episode_count', 'DESC']], limit: 10, include: [{ model: People, as: 'person' }] }, diff --git a/react_frontend/src/types/index.ts b/react_frontend/src/types/index.ts index 710cb53..34c8e9c 100644 --- a/react_frontend/src/types/index.ts +++ b/react_frontend/src/types/index.ts @@ -162,10 +162,11 @@ export interface Credit { id: number; entry_id: number; people_id: number; - character: string | null; + character: string | null; // might contain multiple separated by ; cast_type: 'cast' | 'crew'; department: string | null; job: string | null; + episode_count?: number | null; order: number | null; people?: People; entry?: Entry; diff --git a/react_frontend/vite.config.ts b/react_frontend/vite.config.ts index cdeddfe..703666d 100644 --- a/react_frontend/vite.config.ts +++ b/react_frontend/vite.config.ts @@ -12,11 +12,14 @@ export default defineConfig({ }, }, server: { + port: 4200, proxy: { '/api': { target: 'http://showyback.coolguy.space', + // target: 'http://localhost:4000', changeOrigin: true, }, }, + allowedHosts: ['localhost', 'showyback.coolguy.space', 'showy.coolguy.space'], }, })