@@ -31,7 +31,7 @@ app.get('/', wpClientMw, async (c) => {
31
31
if ( queryParams . authorSlug ) {
32
32
const authorResult = await c . var . wpClient . get < { id } [ ] > ( 'users' , {
33
33
slug : queryParams . authorSlug ,
34
- _fields : 'id' ,
34
+ _fields : 'id,type ' ,
35
35
} ) ;
36
36
const id = authorResult . data [ 0 ] ?. id ;
37
37
if ( id ) {
@@ -42,7 +42,7 @@ app.get('/', wpClientMw, async (c) => {
42
42
const result = await c . var . wpClient . get < WPPostDto [ ] > ( 'posts' , {
43
43
...query ,
44
44
_fields :
45
- 'slug,title.rendered,author,excerpt.rendered,date,featured_image_url,author_details.name,author_details.avatar_url,author_details.slug,acf' ,
45
+ 'id,type, slug,title.rendered,author,excerpt.rendered,date,featured_image_url,author_details.name,author_details.avatar_url,author_details.slug,acf' ,
46
46
} ) ;
47
47
48
48
return c . json ( < ArrayResponse < ArticlePreview > > {
@@ -57,7 +57,7 @@ app.get('/:slug', wpClientMw, async (c) => {
57
57
const result = await c . var . wpClient . get < WPPostDetailsDto [ ] > ( 'posts' , {
58
58
slug : slug ,
59
59
_fields :
60
- 'slug,title.rendered,author,content.rendered,date,featured_image_url,author_details,acf' ,
60
+ 'id,type, slug,title.rendered,author,content.rendered,date,featured_image_url,author_details,acf' ,
61
61
} ) ;
62
62
63
63
return c . json ( toArticle ( result . data [ 0 ] ) ) ;
0 commit comments