client-ts: Add some small adjustments

This commit is contained in:
Elian Doran 2024-08-04 13:37:39 +03:00
parent f1896c3f5f
commit 28f633d903
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,10 @@ interface RequestData {
silentNotFound: boolean;
}
export interface StandardResponse {
success: boolean;
}
async function getHeaders(headers?: Headers) {
const appContext = (await import('../components/app_context.js')).default;
const activeNoteContext = appContext.tabManager ? appContext.tabManager.getActiveContext() : null;
@ -62,7 +66,7 @@ async function post<T>(url: string, data?: unknown, componentId?: string) {
return await call<T>('POST', url, componentId, { data });
}
async function put<T>(url: string, data: unknown, componentId?: string) {
async function put<T>(url: string, data?: unknown, componentId?: string) {
return await call<T>('PUT', url, componentId, { data });
}

View File

@ -2,6 +2,7 @@ import FNote from "./entities/fnote";
interface ElectronProcess {
type: string;
platform: string;
}
interface CustomGlobals {