1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-22 14:49:40 +02:00

refactor(frontend): 🔥 rewrite backup UI for new page base components

Removed old split code and used the composition api to to re-write the import/export functionality of mealie.
This commit is contained in:
hay-kot 2021-08-21 00:46:43 -08:00
parent 460f508f79
commit edae7bbb21
25 changed files with 535 additions and 759 deletions

View file

@ -10,8 +10,9 @@ export interface BackupOptions {
notifications?: boolean;
}
export interface ImportBackup extends BackupOptions {
export interface ImportBackup {
name: string;
options: BackupOptions;
}
export interface BackupJob {
@ -58,7 +59,7 @@ export class BackupAPI extends BaseAPI {
/** Import a database backup file generated from Mealie.
*/
async restoreDatabase(fileName: string, payload: BackupOptions) {
return await this.requests.post(routes.backupsFileNameImport(fileName), payload);
return await this.requests.post(routes.backupsFileNameImport(fileName), {name: fileName, ...payload});
}
/** Removes a database backup from the file system