api page coverSrc support; filter tags response by field
This commit is contained in:
1 parent
11ff066e6c
commit
1318328fe7
4 files changed
+42
-10
No files matched your search
@@ -20,6 +20,7 @@ type PageDto = {
|
||||
tags: Tag[]
|
||||
featured: boolean
|
||||
breadcrumb: Breadcrumb
|
||||
coverSrc?: string
|
||||
}
|
||||
|
||||
export function encodePage(page: Page): PageDto {
|
||||
@@ -27,6 +28,8 @@ export function encodePage(page: Page): PageDto {
|
||||
const date = page.date ? page.date.toString() : null
|
||||
const breadcrumb = page.getBreadcrumb()
|
||||
|
||||
const coverSrc = page.preview ? page.preview.getSrc() : null
|
||||
|
||||
return {
|
||||
id: page.id,
|
||||
title: page.title,
|
||||
@@ -39,5 +42,6 @@ export function encodePage(page: Page): PageDto {
|
||||
preview,
|
||||
date,
|
||||
breadcrumb,
|
||||
coverSrc,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user