mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-03 06:23:10 -05:00
Docs/v0.5.0 second pass (#496)
* update docs * use auto-gen routes * dumb deps * remove whitespace * github action to build dev docs container * no cache Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -1,25 +1,16 @@
|
||||
import { baseURL } from "./api-utils";
|
||||
import { apiReq } from "./api-utils";
|
||||
import { store } from "../store";
|
||||
import i18n from "@/i18n.js";
|
||||
|
||||
const migrationBase = baseURL + "migrations";
|
||||
|
||||
const migrationURLs = {
|
||||
// New
|
||||
all: migrationBase,
|
||||
delete: (folder, file) => `${migrationBase}/${folder}/${file}/delete`,
|
||||
import: (folder, file) => `${migrationBase}/${folder}/${file}/import`,
|
||||
};
|
||||
import { API_ROUTES } from "./apiRoutes";
|
||||
|
||||
export const migrationAPI = {
|
||||
async getMigrations() {
|
||||
let response = await apiReq.get(migrationURLs.all);
|
||||
let response = await apiReq.get(API_ROUTES.migrations);
|
||||
return response.data;
|
||||
},
|
||||
async delete(folder, file) {
|
||||
const response = await apiReq.delete(
|
||||
migrationURLs.delete(folder, file),
|
||||
API_ROUTES.migrationsImportTypeFileNameDelete(folder, file),
|
||||
null,
|
||||
() => i18n.t("general.file-folder-not-found"),
|
||||
() => i18n.t("migration.migration-data-removed")
|
||||
@@ -27,7 +18,7 @@ export const migrationAPI = {
|
||||
return response;
|
||||
},
|
||||
async import(folder, file) {
|
||||
let response = await apiReq.post(migrationURLs.import(folder, file));
|
||||
let response = await apiReq.post(API_ROUTES.migrationsImportTypeFileNameImport(folder, file));
|
||||
store.dispatch("requestRecentRecipes");
|
||||
return response.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user