From e9bc8886d4fc2193c3fbd4490b33dc3bdc08599a Mon Sep 17 00:00:00 2001 From: X4Lo Date: Thu, 23 Apr 2026 22:23:10 +0100 Subject: [PATCH] Minor changes - Updated frontend credit type - Updated sorting of entry credits in `getEntryById()` --- backend/services/entryService.js | 2 +- react_frontend/src/types/index.ts | 3 ++- react_frontend/vite.config.ts | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) 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'], }, })