recipe stuff

This commit is contained in:
vabene1111
2021-01-12 20:51:28 +01:00
parent 816ced83b5
commit 24ed6a1cd2
12 changed files with 175 additions and 31 deletions

View File

@ -0,0 +1,12 @@
import axios from "axios";
import {makeToast} from "@/utils/utils";
import {resolveDjangoUrl} from "@/utils/utils";
export function apiLoadRecipe(recipe_id) {
return axios.get(resolveDjangoUrl('api:recipe-detail', recipe_id)).then((response) => {
return response.data
}).catch((err) => {
console.log(err)
makeToast('Error', 'There was an error loading a resource!', 'danger')
})
}