Skip to content

Commit

Permalink
fix(daffio): api paths have leading slash (#2728)
Browse files Browse the repository at this point in the history
this will cause the docs JSON files to 404
  • Loading branch information
griest024 committed Jan 25, 2024
1 parent 1e2174f commit 312a91b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/daffio/src/app/docs/resolvers/docs-resolver.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {
catchError,
} from 'rxjs/operators';

import { daffUriTruncateQueryFragment } from '@daffodil/core/routing';
import {
daffUriTruncateLeadingSlash,
daffUriTruncateQueryFragment,
} from '@daffodil/core/routing';

import { DaffioDoc } from '../models/doc';
import { DaffioGuideList } from '../models/guide-list';
Expand All @@ -29,7 +32,7 @@ export class DocsResolver<T extends DaffioDoc, V extends DaffioGuideList> {
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> {
return this.docService
//remove any route fragment and initial slash from the route.
.get(daffUriTruncateQueryFragment(state.url))
.get(daffUriTruncateLeadingSlash(daffUriTruncateQueryFragment(state.url)))
.pipe(
take(1),
catchError(() => {
Expand Down

0 comments on commit 312a91b

Please sign in to comment.