Skip to content

Commit

Permalink
Fix minor issues with versions and inserted URLs (#2947)
Browse files Browse the repository at this point in the history
* embed correct version

* ndla: return facade url for content
  • Loading branch information
emmachughes authored Feb 6, 2025
1 parent 6f1582a commit ca7ff22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sourcecode/hub/app/Http/Controllers/ContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function embed(Content $content, ContentVersion|null $version = null): Vi

return view('content.embed', [
'content' => $content,
'version' => $content->latestPublishedVersion,
'version' => $version,
'launch' => $launch,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function content(OembedRequest $request): Response
$data = $this->serializer->serialize(new RichContentResponse(
html: view('ndla-legacy.oembed', [
'id' => $id,
'src' => route('content.embed', [$content]),
'src' => route('ndla-legacy.resource', [$id]),
'title' => $content->getTitle(),
])->render(),
width: 800,
Expand Down

0 comments on commit ca7ff22

Please sign in to comment.