このコミットが含まれているのは:
+18
-12
@@ -4,22 +4,28 @@ import type { Post, PostTagChange } from '@/types'
|
||||
|
||||
|
||||
export const fetchPosts = async (
|
||||
{ tags, match, page, limit, cursor }: {
|
||||
tags: string
|
||||
match: 'any' | 'all'
|
||||
page?: number
|
||||
limit?: number
|
||||
cursor?: string }
|
||||
{ url, title, tags, match, created_from, created_to, updated_from,
|
||||
updated_to, original_created_from, original_created_to, page, limit }: {
|
||||
url?: string
|
||||
title?: string
|
||||
tags?: string
|
||||
match?: 'all' | 'any'
|
||||
created_from?: string
|
||||
created_to?: string
|
||||
updated_from?: string
|
||||
updated_to?: string
|
||||
original_created_from?: string
|
||||
original_created_to?: string
|
||||
page?: number
|
||||
limit?: number },
|
||||
): Promise<{
|
||||
posts: Post[]
|
||||
count: number
|
||||
nextCursor: string }> =>
|
||||
count: number }> =>
|
||||
await apiGet ('/posts', { params: {
|
||||
tags,
|
||||
match,
|
||||
url, title, tags, match, created_from, created_to, updated_from, updated_to,
|
||||
original_created_from, original_created_to,
|
||||
...(page && { page }),
|
||||
...(limit && { limit }),
|
||||
...(cursor && { cursor }) } })
|
||||
...(limit && { limit }) } })
|
||||
|
||||
|
||||
export const fetchPost = async (id: string): Promise<Post> => await apiGet (`/posts/${ id }`)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする