Model: fix getById

This commit is contained in:
Alice Gaudon 2020-07-27 10:54:08 +02:00
parent 5ca1ddef43
commit 51addd947b
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ export default abstract class Model {
}
public static async getById<T extends Model>(this: Type<T>, ...id: any): Promise<T | null> {
return ModelFactory.get(this).getById(id);
return ModelFactory.get(this).getById(...id);
}
public static async paginate<T extends Model>(this: Type<T>, request: Request, perPage: number = 20, query?: ModelQuery<T>): Promise<ModelQueryResult<T>> {