mirror of
https://github.com/docmost/docmost.git
synced 2026-05-21 17:22:54 +08:00
06d854a7d2
* ui polishing * frontend and backend fixes
22 lines
557 B
TypeScript
22 lines
557 B
TypeScript
import api from "@/lib/api-client";
|
|
import {
|
|
IPageSearch,
|
|
IPageSearchParams,
|
|
ISuggestionResult,
|
|
SearchSuggestionParams,
|
|
} from "@/features/search/types/search.types";
|
|
|
|
export async function searchPage(
|
|
params: IPageSearchParams,
|
|
): Promise<IPageSearch[]> {
|
|
const req = await api.post<IPageSearch[]>("/search", params);
|
|
return req.data;
|
|
}
|
|
|
|
export async function searchSuggestions(
|
|
params: SearchSuggestionParams,
|
|
): Promise<ISuggestionResult> {
|
|
const req = await api.post<ISuggestionResult>("/search/suggest", params);
|
|
return req.data;
|
|
}
|