1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 15:27:43 +01:00

feat: Aggiunti alias per alcuni metodi del Model

This commit is contained in:
Maicol Battistini 2021-12-18 13:23:33 +01:00
parent 7178c05383
commit d687afbe73
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A

View File

@ -9,7 +9,9 @@ import {snakeCase} from 'lodash-es';
*/
export default class Model extends BaseModel {
/**
* Just an alias to the get() method
* Just an alias to the get() method.
*
* Returns all the instances of the model.
*/
static all(): Promise<PluralResponse<InstanceType<Model>>> {
return this.get();
@ -21,6 +23,18 @@ export default class Model extends BaseModel {
}
}
getAttribute(attributeName: string): any {
return super.getAttribute(attributeName);
}
setAttribute(attributeName: string, value: any) {
super.setAttribute(attributeName, value);
}
getAttributes(): { [p: string]: any } {
return super.getAttributes();
}
getJsonApiBaseUrl(): string {
return '/api';
}