このコミットが含まれているのは:
2026-02-25 00:56:37 +09:00
コミット 3e5eb4687b
5個のファイルの変更135行の追加52行の削除
+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 }`)