mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 04:55:21 +02:00
fix: cookbook ordering in frontend (#2180)
* fixes cookbook ordering in frontend
* Revert "fixes cookbook ordering in frontend"
This reverts commit 1b5b172911
.
* Fix cookbook ordering the proper way
This commit is contained in:
parent
8b181ec28a
commit
ac0432d47a
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ export const useCookbooks = function () {
|
||||||
getAll() {
|
getAll() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const units = useAsync(async () => {
|
const units = useAsync(async () => {
|
||||||
const { data } = await api.cookbooks.getAll();
|
const { data } = await api.cookbooks.getAll(1, -1, { orderBy: "position", orderDirection: "asc" });
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
return data.items;
|
return data.items;
|
||||||
|
@ -45,7 +45,7 @@ export const useCookbooks = function () {
|
||||||
},
|
},
|
||||||
async refreshAll() {
|
async refreshAll() {
|
||||||
loading.value = true;
|
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) {
|
if (data && data.items && cookbookStore) {
|
||||||
cookbookStore.value = data.items;
|
cookbookStore.value = data.items;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue