Skip to content

Commit

Permalink
fix(core): Return type of collection breadcrumb was missing slug (#2960)
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug authored Jul 19, 2024
1 parent dd02135 commit 620eeb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class CollectionEntityResolver {
@Ctx() ctx: RequestContext,
@Parent() collection: Collection,
): Promise<CollectionBreadcrumb[]> {
return this.collectionService.getBreadcrumbs(ctx, collection) as any;
return this.collectionService.getBreadcrumbs(ctx, collection);
}

@ResolveField()
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/service/services/collection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export class CollectionService implements OnModuleInit {
async getBreadcrumbs(
ctx: RequestContext,
collection: Collection,
): Promise<Array<{ name: string; id: ID }>> {
): Promise<Array<{ name: string; id: ID, slug: string }>> {
const rootCollection = await this.getRootCollection(ctx);
if (idsAreEqual(collection.id, rootCollection.id)) {
return [pick(rootCollection, ['id', 'name', 'slug'])];
Expand Down

0 comments on commit 620eeb1

Please sign in to comment.