mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 00:02:28 +08:00
chore(client/ts): port services/search
This commit is contained in:
parent
8454be0a6a
commit
36cb07b2f9
@ -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);
|
Loading…
x
Reference in New Issue
Block a user