mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 10:21:15 +01:00
Nested sidebar ordering almost working
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import type { Environment, HttpRequest, Workspace } from './models';
|
||||
import type { Environment, Folder, HttpRequest, Workspace } from './models';
|
||||
|
||||
export async function getRequest(id: string | null): Promise<HttpRequest | null> {
|
||||
if (id === null) return null;
|
||||
@@ -19,6 +19,15 @@ export async function getEnvironment(id: string | null): Promise<Environment | n
|
||||
return environment;
|
||||
}
|
||||
|
||||
export async function getFolder(id: string | null): Promise<Folder | null> {
|
||||
if (id === null) return null;
|
||||
const folder: Folder = (await invoke('get_folder', { id })) ?? null;
|
||||
if (folder == null) {
|
||||
return null;
|
||||
}
|
||||
return folder;
|
||||
}
|
||||
|
||||
export async function getWorkspace(id: string | null): Promise<Workspace | null> {
|
||||
if (id === null) return null;
|
||||
const workspace: Workspace = (await invoke('get_workspace', { id })) ?? null;
|
||||
|
||||
Reference in New Issue
Block a user