mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
remove duplicate code
This commit is contained in:
parent
273438156e
commit
5e41d66c25
1 changed files with 0 additions and 2 deletions
|
@ -37,14 +37,12 @@ const mutations = {
|
|||
const actions = {
|
||||
async requestRecentRecipes() {
|
||||
const payload = await api.recipes.allSummary(0, 30);
|
||||
recipe.sortByUpdated(payload);
|
||||
const hash = Object.fromEntries(payload.map(e => [e.id, e]));
|
||||
this.commit("setRecentRecipes", hash);
|
||||
},
|
||||
async requestAllRecipes({ getters }) {
|
||||
const all = getters.getAllRecipes;
|
||||
const payload = await api.recipes.allSummary(all.length, 9999);
|
||||
recipe.sortByUpdated(payload);
|
||||
const hash = Object.fromEntries([...all, ...payload].map(e => [e.id, e]));
|
||||
|
||||
this.commit("setAllRecipes", hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue