From 51addd947b7e5119f643b192460393bdf7d932c4 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 27 Jul 2020 10:54:08 +0200 Subject: [PATCH] Model: fix getById --- src/db/Model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/Model.ts b/src/db/Model.ts index 25d3993..3488f83 100644 --- a/src/db/Model.ts +++ b/src/db/Model.ts @@ -33,7 +33,7 @@ export default abstract class Model { } public static async getById(this: Type, ...id: any): Promise { - return ModelFactory.get(this).getById(id); + return ModelFactory.get(this).getById(...id); } public static async paginate(this: Type, request: Request, perPage: number = 20, query?: ModelQuery): Promise> {