diff --git a/README.md b/README.md index ae2cf9d445dd..7cadf8a0b9c6 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ **Mealie** is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relavent data or add a family recipe with the UI editor. -Mealie also provides a secure API for interactions from 3rd party applications. **Why does my recipe manager need an API?** An API allows integration into applications like [Home Assistant]() that can act as notification engines to provide custom notifications based of Meal Plan data to remind you to defrost the chicken, marinade the steak, or start the CrockPot. See the section on [Meal Plan hooks](#hooks) for more information. Additionally, you can access any avaiable API from the backend server. To explore the API spin up your server and navigate to http://yourserver.com/docs for interactive API documentation. +Mealie also provides a secure API for interactions from 3rd party applications. **Why does my recipe manager need an API?** An API allows integration into applications like [Home Assistant]() that can act as notification engines to provide custom notifications based of Meal Plan data to remind you to defrost the chicken, marinade the steak, or start the CrockPot. See the section on [Meal Plan hooks](#hooks) for more information. Additionally, you can access any available API from the backend server. To explore the API spin up your server and navigate to http://yourserver.com/docs for interactive API documentation. diff --git a/docs/docs/1.3 - admin-panel.md b/docs/docs/1.3 - admin-panel.md index 57084d5c15b6..5eb731a40ea4 100644 --- a/docs/docs/1.3 - admin-panel.md +++ b/docs/docs/1.3 - admin-panel.md @@ -15,7 +15,7 @@ Color themes can be created and set from the UI in the settings page. You can se ## Backup and Export All recipe data can be imported and exported as necessary from the UI. Under the admin page you'll find the section for using Backups and Exports. -To create an export simple add the tag and the markdown template and click Backup Recipes and your backup will be created on the server. The backup is a standard zipfile containing all the images, json files, and rendered markdown files for each recipe. Markdown files are rendered from jinja2 templates. Adding your own markdown file into the templates folder will automatically show up as an option to select when creating a backup. +To create an export simple add the tag and the markdown template and click Backup Recipes and your backup will be created on the server. The backup is a standard zipfile containing all the images, json files, and rendered markdown files for each recipe. Markdown files are rendered from jinja2 templates. Adding your own markdown file into the templates folder will automatically show up as an option to select when creating a backup. To view the availible variables, open a recipe in the json editor. To import a backup it must be in your backups folder. If it is in the backup folder it will automatically show up as an source to restore from. Selected the desired backup and import the backup file. diff --git a/frontend/src/api/backup.js b/frontend/src/api/backup.js index 8d8f611d3c84..e6971151efdd 100644 --- a/frontend/src/api/backup.js +++ b/frontend/src/api/backup.js @@ -6,7 +6,7 @@ const backupBase = baseURL + "backups/"; const backupURLs = { // Backup - avaiable: `${backupBase}avaiable/`, + available: `${backupBase}available/`, createBackup: `${backupBase}export/database/`, importBackup: (fileName) => `${backupBase}${fileName}/import/`, deleteBackup: (fileName) => `${backupBase}${fileName}/delete/`, @@ -14,7 +14,7 @@ const backupURLs = { export default { async requestAvailable() { - let response = await apiReq.get(backupURLs.avaiable); + let response = await apiReq.get(backupURLs.available); return response.data; }, diff --git a/frontend/src/components/Admin/Theme.vue b/frontend/src/components/Admin/Theme.vue index 9dc6828189ef..392f58a9a31f 100644 --- a/frontend/src/components/Admin/Theme.vue +++ b/frontend/src/components/Admin/Theme.vue @@ -21,7 +21,7 @@ Choose a Recipe list: return successful_imports -def export_db(tag=None, template=None): +def export_db(tag=None, template=None) -> str: if tag: export_tag = tag + "_" + datetime.now().strftime("%Y-%b-%d") else: @@ -80,6 +80,8 @@ def export_db(tag=None, template=None): shutil.rmtree(backup_folder) shutil.rmtree(TEMP_DIR) + return str(zip_path.absolute()) + ".zip" + def export_images(dest_dir) -> Path: