dev #55

Merged
JoeKung merged 4 commits from dev into main 2026-03-25 11:57:50 +01:00
3 changed files with 10 additions and 9 deletions
Showing only changes of commit 8835175fb3 - Show all commits

View File

@@ -137,7 +137,9 @@ export const serverOriginInterceptor: HttpInterceptorFn = (req, next) => {
return next(req);
}
const request = inject(REQUEST, { optional: true }) as ServerRequestLike | null;
const request = inject(REQUEST, {
optional: true,
}) as ServerRequestLike | null;
const origin = resolveApiOrigin(request, req.url);
if (!origin) {
return next(req);

View File

@@ -220,7 +220,8 @@ describe('ShopService', () => {
next: (product) => {
response = product;
},
error: () => fail('Expected stale slug tails to resolve from the uuid prefix'),
error: () =>
fail('Expected stale slug tails to resolve from the uuid prefix'),
});
const request = httpMock.expectOne((request) => {
@@ -243,7 +244,8 @@ describe('ShopService', () => {
next: (product) => {
response = product;
},
error: () => fail('Expected bare uuid path to resolve from the uuid prefix'),
error: () =>
fail('Expected bare uuid path to resolve from the uuid prefix'),
});
const request = httpMock.expectOne((request) => {

View File

@@ -295,12 +295,9 @@ export class ShopService {
? `${this.apiUrl}/products/by-id-prefix/${encodeURIComponent(productIdPrefix)}`
: `${this.apiUrl}/products/by-path/${encodeURIComponent(normalizedPath)}`;
return this.http.get<ShopProductDetail>(
endpoint,
{
return this.http.get<ShopProductDetail>(endpoint, {
params: this.buildLangParams(),
},
);
});
}
private normalizePublicPath(value: string | null | undefined): string {