From ac0432d47ae31c5a481c599cc32ef8a3b2c70ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Sun, 26 Feb 2023 21:48:32 +0100 Subject: [PATCH] fix: cookbook ordering in frontend (#2180) * fixes cookbook ordering in frontend * Revert "fixes cookbook ordering in frontend" This reverts commit 1b5b17291150079ddac1f6d9edb7eabcc8e12dd1. * Fix cookbook ordering the proper way --- frontend/composables/use-group-cookbooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/composables/use-group-cookbooks.ts b/frontend/composables/use-group-cookbooks.ts index 1aba143d4dcf..63362ef0be94 100644 --- a/frontend/composables/use-group-cookbooks.ts +++ b/frontend/composables/use-group-cookbooks.ts @@ -31,7 +31,7 @@ export const useCookbooks = function () { getAll() { loading.value = true; const units = useAsync(async () => { - const { data } = await api.cookbooks.getAll(); + const { data } = await api.cookbooks.getAll(1, -1, { orderBy: "position", orderDirection: "asc" }); if (data) { return data.items; @@ -45,7 +45,7 @@ export const useCookbooks = function () { }, async refreshAll() { loading.value = true; - const { data } = await api.cookbooks.getAll(); + const { data } = await api.cookbooks.getAll(1, -1, { orderBy: "position", orderDirection: "asc" }); if (data && data.items && cookbookStore) { cookbookStore.value = data.items;