1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

fixes cookbook ordering in frontend

This commit is contained in:
Sören Busch 2023-02-25 23:04:57 +01:00
parent 39012adcc1
commit 1b5b172911

View file

@ -21,13 +21,14 @@ export abstract class BaseAPI {
export abstract class BaseCRUDAPI<CreateType, ReadType, UpdateType = CreateType>
extends BaseAPI
implements CrudAPIInterface {
implements CrudAPIInterface
{
abstract baseRoute: string;
abstract itemRoute(itemId: string | number): string;
async getAll(page = 1, perPage = -1, params = {} as any) {
return await this.requests.get<PaginationData<ReadType>>(this.baseRoute, {
params: { page, perPage, ...params },
params: { page, perPage, orderBy: "position", orderDirection: "asc", ...params },
});
}