mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 16:56:34 +01:00
chore(client/ts): port services/search
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import server from "./server.js";
|
import server from "./server.js";
|
||||||
import froca from "./froca.js";
|
import froca from "./froca.js";
|
||||||
|
|
||||||
async function searchForNoteIds(searchString) {
|
async function searchForNoteIds(searchString: string) {
|
||||||
return await server.get(`search/${encodeURIComponent(searchString)}`);
|
return await server.get<string[]>(`search/${encodeURIComponent(searchString)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function searchForNotes(searchString) {
|
async function searchForNotes(searchString: string) {
|
||||||
const noteIds = await searchForNoteIds(searchString);
|
const noteIds = await searchForNoteIds(searchString);
|
||||||
|
|
||||||
return await froca.getNotes(noteIds);
|
return await froca.getNotes(noteIds);
|
||||||
Reference in New Issue
Block a user