mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
Get Recipes Route Rewrite (#339)
* deprecate old route * auto-gen * recipe card infinite scroll * fix datatable * set hard-limit option * add loader * set scroll on navigation * add auto-import * fix slow initial load * remove console.logs Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
80f8806604
commit
8e4b951ecc
19 changed files with 128 additions and 73 deletions
|
@ -2,7 +2,6 @@ import { baseURL } from "./api-utils";
|
|||
import { apiReq } from "./api-utils";
|
||||
import { store } from "../store";
|
||||
import { router } from "../main";
|
||||
import qs from "qs";
|
||||
|
||||
const prefix = baseURL + "recipes/";
|
||||
|
||||
|
@ -78,22 +77,10 @@ export const recipeAPI = {
|
|||
router.push(`/`);
|
||||
},
|
||||
|
||||
async allByKeys(recipeKeys, num = 9999) {
|
||||
const response = await apiReq.get(recipeURLs.allRecipes, {
|
||||
params: {
|
||||
keys: recipeKeys,
|
||||
num: num,
|
||||
},
|
||||
paramsSerializer: params => {
|
||||
return qs.stringify(params, { arrayFormat: "repeat" });
|
||||
},
|
||||
async allSummary(start = 0, limit = 9999) {
|
||||
const response = await apiReq.get(recipeURLs.summary, {
|
||||
params: { start: start, limit: limit },
|
||||
});
|
||||
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async allSummary() {
|
||||
const response = await apiReq.get(recipeURLs.summary);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue