add new openDatabse function

This commit is contained in:
Adrian Zürcher
2026-02-19 10:50:40 +01:00
parent 6392877dc1
commit ab88acd740
6 changed files with 29 additions and 19 deletions

View File

@@ -0,0 +1,14 @@
import { appApi } from 'src/boot/axios';
import { databaseName, workspace } from '../models/settings';
export async function openDatabase() {
let path = databaseName.value;
if (workspace.value !== '') {
path = workspace.value + '/' + path;
}
return appApi.post('database/open', {
dbPath: path,
create: true,
});
}