add new openDatabse function
This commit is contained in:
14
src/vueLib/components/DatabaseCall.ts
Normal file
14
src/vueLib/components/DatabaseCall.ts
Normal 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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user