mirror of
https://github.com/docmost/docmost.git
synced 2026-05-23 02:32:42 +08:00
space updates
* space UI * space management * space permissions * other fixes
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import api from '@/lib/api-client';
|
||||
import { IPageSearch } from '@/features/search/types/search.types';
|
||||
import api from "@/lib/api-client";
|
||||
import {
|
||||
IPageSearch,
|
||||
ISuggestionResult,
|
||||
SearchSuggestionParams,
|
||||
} from "@/features/search/types/search.types";
|
||||
|
||||
export async function searchPage(query: string): Promise<IPageSearch[]> {
|
||||
const req = await api.post<IPageSearch[]>('/search', { query });
|
||||
return req.data as any;
|
||||
const req = await api.post<IPageSearch[]>("/search", { query });
|
||||
return req.data;
|
||||
}
|
||||
|
||||
export async function searchSuggestions(
|
||||
params: SearchSuggestionParams,
|
||||
): Promise<ISuggestionResult> {
|
||||
const req = await api.post<ISuggestionResult>("/search/suggest", params);
|
||||
return req.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user