mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
currently everything working
This commit is contained in:
12
vue/src/utils/django.js
Normal file
12
vue/src/utils/django.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import axios from "axios";
|
||||
import {makeToast} from "@/utils/utils";
|
||||
|
||||
|
||||
export function apiLoadRecipe(recipe_id) {
|
||||
return axios.get(`/api/recipe/${recipe_id}`).then((response) => {
|
||||
return response.data
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
makeToast('Error', 'There was an error loading a resource!', 'danger')
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user