Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@tanstack/query-core": "5.101.4",
"@tanstack/query-devtools": "5.101.4",
"@tanstack/query-persist-client-core": "5.101.4",
"@trakt/api": "npm:@jsr/trakt__api@0.5.4",
"@trakt/api": "npm:@jsr/trakt__api@0.6.0",
"@ts-rest/core": "3.52.1",
"@use-gesture/vanilla": "10.3.1",
"bits-ui": "2.18.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const episodeIntlRequest = (
id: slug,
season: castNumberAsString(season),
episode,
},
query: {
language,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const movieIntlRequest = (
.translations({
params: {
id: slug,
},
query: {
language,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const showIntlRequest = (
.translations({
params: {
id: slug,
},
query: {
language,
},
});
Expand Down
23 changes: 8 additions & 15 deletions projects/client/src/mocks/handlers/movies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,14 @@ export const movies = [
},
),
http.get(
`http://localhost/movies/${MovieHereticResponseMock.ids.slug}/translations/en`,
() => {
return HttpResponse.json(MovieHereticTranslationsResponseMock.get('en'));
},
),
http.get(
`http://localhost/movies/${MovieHereticResponseMock.ids.slug}/translations/nl`,
() => {
return HttpResponse.json(MovieHereticTranslationsResponseMock.get('nl'));
},
),
http.get(
`http://localhost/movies/${MovieHereticResponseMock.ids.slug}/translations/pt`,
() => {
return HttpResponse.json(MovieHereticTranslationsResponseMock.get('pt'));
`http://localhost/movies/${MovieHereticResponseMock.ids.slug}/translations`,
({ request }) => {
const { searchParams } = new URL(request.url);
return HttpResponse.json(
MovieHereticTranslationsResponseMock.get(
searchParams.get('language') ?? '',
),
);
},
),
http.get(
Expand Down
42 changes: 14 additions & 28 deletions projects/client/src/mocks/handlers/shows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,13 @@ export const shows = [
},
),
http.get(
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/translations/en`,
() => {
return HttpResponse.json(
ShowSiloTranslationsResponseMock.get('en'),
);
},
),
http.get(
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/translations/nl`,
() => {
return HttpResponse.json(
ShowSiloTranslationsResponseMock.get('nl'),
);
},
),
http.get(
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/translations/ja`,
() => {
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/translations`,
({ request }) => {
const { searchParams } = new URL(request.url);
return HttpResponse.json(
ShowSiloTranslationsResponseMock.get('ja'),
ShowSiloTranslationsResponseMock.get(
searchParams.get('language') ?? '',
),
);
},
),
Expand Down Expand Up @@ -173,15 +160,14 @@ export const shows = [
},
),
http.get(
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/seasons/${EpisodeSiloResponseMock.season}/episodes/${EpisodeSiloResponseMock.number}/translations/en`,
() => {
return HttpResponse.json(EpisodeSiloTranslationsResponseMock.get('en'));
},
),
http.get(
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/seasons/${EpisodeSiloResponseMock.season}/episodes/${EpisodeSiloResponseMock.number}/translations/nl`,
() => {
return HttpResponse.json(EpisodeSiloTranslationsResponseMock.get('nl'));
`http://localhost/shows/${ShowSiloResponseMock.ids.slug}/seasons/${EpisodeSiloResponseMock.season}/episodes/${EpisodeSiloResponseMock.number}/translations`,
({ request }) => {
const { searchParams } = new URL(request.url);
return HttpResponse.json(
EpisodeSiloTranslationsResponseMock.get(
searchParams.get('language') ?? '',
),
);
},
),
http.get(
Expand Down