feat: paginate/search words and improve review flow
This commit is contained in:
@@ -6,7 +6,7 @@ export async function addWord(word: string) {
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function getWords(params: { limit?: number; offset?: number } = {}) {
|
||||
export async function getWords(params: { limit?: number; offset?: number; q?: string } = {}) {
|
||||
const res = await http.get<{ data: Word[]; total: number }>('/words', { params })
|
||||
return res.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user