Skip to content

Commit

Permalink
feat: 文章列表接口新增作者信息
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Feb 3, 2023
1 parent 4de8cc3 commit 02aac99
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/server/api/articles/list.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { useGraphql } from '~~/utils/useGraphql'
import { useTime } from '~~/composables/useTime'
interface IAuthor {
id: string
name: string
motto: string
avatar: string
rank: Number
liked: Number
viewed: Number
}

interface ITagItem {
Expand Down Expand Up @@ -72,8 +78,14 @@ export default defineEventHandler(async (event): Promise<IArticleItem[]> => {
createdAt
authorId{
data{
id
attributes{
name
motto
avatar
rank
liked
viewed
}
}
}
Expand Down

0 comments on commit 02aac99

Please sign in to comment.