directory back up (parent) button + drag entry into parent to move
This commit is contained in:
@@ -28,9 +28,9 @@ export async function getWarrens(): Promise<Record<string, WarrenData>> {
|
||||
export async function getWarrenDirectory(
|
||||
warrenId: string,
|
||||
path: string
|
||||
): Promise<DirectoryEntry[]> {
|
||||
): Promise<{ files: DirectoryEntry[]; parent: DirectoryEntry | null }> {
|
||||
const { data, error } = await useFetch<
|
||||
ApiResponse<{ files: DirectoryEntry[] }>
|
||||
ApiResponse<{ files: DirectoryEntry[]; parent: DirectoryEntry | null }>
|
||||
>(getApiUrl(`warrens/files/ls`), {
|
||||
method: 'POST',
|
||||
headers: getApiHeaders(),
|
||||
@@ -44,9 +44,9 @@ export async function getWarrenDirectory(
|
||||
throw error.value?.name;
|
||||
}
|
||||
|
||||
const { files } = data.value.data;
|
||||
const { files, parent } = data.value.data;
|
||||
|
||||
return files;
|
||||
return { files, parent };
|
||||
}
|
||||
|
||||
export async function createDirectory(
|
||||
|
||||
Reference in New Issue
Block a user