mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
refactor(frontend): 🚧 Migrate Dashboard to Nuxt
Add API and Functinality for Admin Dashboard. Stills needs to clean-up. See // TODO's
This commit is contained in:
parent
41a6916771
commit
9386cc320b
32 changed files with 671 additions and 113 deletions
|
@ -44,15 +44,17 @@ export const crudMixins = <T>(
|
|||
return { getAll, getOne, updateOne, patchOne, deleteOne, createOne };
|
||||
};
|
||||
|
||||
export abstract class BaseAPIClass<T, U> implements CrudAPIInterface {
|
||||
export abstract class BaseAPI {
|
||||
requests: ApiRequestInstance;
|
||||
|
||||
abstract baseRoute: string;
|
||||
abstract itemRoute(itemId: string | number): string;
|
||||
|
||||
constructor(requests: ApiRequestInstance) {
|
||||
this.requests = requests;
|
||||
}
|
||||
}
|
||||
|
||||
export abstract class BaseCRUDAPI<T, U> extends BaseAPI implements CrudAPIInterface {
|
||||
abstract baseRoute: string;
|
||||
abstract itemRoute(itemId: string | number): string;
|
||||
|
||||
async getAll(start = 0, limit = 9999) {
|
||||
return await this.requests.get<T[]>(this.baseRoute, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue