タグ一覧ページの作成(#61) (#298)
#61 #61 Merge remote-tracking branch 'origin/main' into feature/061 #61 #61 #61 #61 #61 #61 #61 #61 #61 #61 日づけ不詳の表示修正 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #298
This commit was merged in pull request #298.
This commit is contained in:
@@ -5,7 +5,7 @@ import type { FetchPostsParams, Post, PostTagChange } from '@/types'
|
||||
|
||||
export const fetchPosts = async (
|
||||
{ url, title, tags, match, createdFrom, createdTo, updatedFrom, updatedTo,
|
||||
originalCreatedFrom, originalCreatedTo, page, limit, order }: FetchPostsParams
|
||||
originalCreatedFrom, originalCreatedTo, page, limit, order }: FetchPostsParams,
|
||||
): Promise<{
|
||||
posts: Post[]
|
||||
count: number }> =>
|
||||
@@ -29,14 +29,17 @@ export const fetchPost = async (id: string): Promise<Post> => await apiGet (`/po
|
||||
|
||||
|
||||
export const fetchPostChanges = async (
|
||||
{ id, page, limit }: {
|
||||
{ id, tag, page, limit }: {
|
||||
id?: string
|
||||
tag?: string
|
||||
page: number
|
||||
limit: number },
|
||||
): Promise<{
|
||||
changes: PostTagChange[]
|
||||
count: number }> =>
|
||||
await apiGet ('/posts/changes', { params: { ...(id && { id }), page, limit } })
|
||||
await apiGet ('/posts/changes', { params: { ...(id && { id }),
|
||||
...(tag && { tag }),
|
||||
page, limit } })
|
||||
|
||||
|
||||
export const toggleViewedFlg = async (id: string, viewed: boolean): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user