mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 04:55:21 +02:00
fixes cookbook ordering in frontend
This commit is contained in:
parent
39012adcc1
commit
1b5b172911
1 changed files with 3 additions and 2 deletions
|
@ -21,13 +21,14 @@ export abstract class BaseAPI {
|
||||||
|
|
||||||
export abstract class BaseCRUDAPI<CreateType, ReadType, UpdateType = CreateType>
|
export abstract class BaseCRUDAPI<CreateType, ReadType, UpdateType = CreateType>
|
||||||
extends BaseAPI
|
extends BaseAPI
|
||||||
implements CrudAPIInterface {
|
implements CrudAPIInterface
|
||||||
|
{
|
||||||
abstract baseRoute: string;
|
abstract baseRoute: string;
|
||||||
abstract itemRoute(itemId: string | number): string;
|
abstract itemRoute(itemId: string | number): string;
|
||||||
|
|
||||||
async getAll(page = 1, perPage = -1, params = {} as any) {
|
async getAll(page = 1, perPage = -1, params = {} as any) {
|
||||||
return await this.requests.get<PaginationData<ReadType>>(this.baseRoute, {
|
return await this.requests.get<PaginationData<ReadType>>(this.baseRoute, {
|
||||||
params: { page, perPage, ...params },
|
params: { page, perPage, orderBy: "position", orderDirection: "asc", ...params },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue