Fix Ghost API response type in blog slug route
cgen-b228c5934a6b48c59b428cede8a584ad
This commit is contained in:
parent
8483b0755f
commit
118b6a4424
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ async function fetchFromGhost(slug: string): Promise<any | null> {
|
|||
return null;
|
||||
}
|
||||
|
||||
const data: GhostApiResponse = await response.json();
|
||||
const data = (await response.json()) as GhostApiResponse;
|
||||
const post = data.posts && data.posts.length > 0 ? data.posts[0] : null;
|
||||
|
||||
if (!post) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue