chore: clean up

This commit is contained in:
Louis 2025-03-31 20:13:31 +07:00
parent 8f0b7dc87c
commit 24cafa2d30
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
2 changed files with 1 additions and 6 deletions

View File

@ -18,11 +18,7 @@ export const setupCoreServices = () => {
engineManager: new EngineManager(), engineManager: new EngineManager(),
toolManager: new ToolManager(), toolManager: new ToolManager(),
api: { api: {
...(window.electronAPI ...(window.electronAPI ?? (IS_TAURI ? tauriAPI : restAPI)),
? window.electronAPI
: IS_TAURI
? tauriAPI
: restAPI),
...appService, ...appService,
}, },
} }

View File

@ -17,7 +17,6 @@ export const restAPI = {
return { return {
...acc, ...acc,
[proxy.route]: (...args: any) => { [proxy.route]: (...args: any) => {
return Promise.resolve(undefined)
// For each route, define a function that sends a request to the API // For each route, define a function that sends a request to the API
return fetch( return fetch(
`${window.core?.api.baseApiUrl}/v1/${proxy.path}/${proxy.route}`, `${window.core?.api.baseApiUrl}/v1/${proxy.path}/${proxy.route}`,