From 70c065d64c330196d371941d9294a55da6e3aa37 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jun 2017 09:54:59 +0200 Subject: Add this context to instance model functions --- server/models/pod/pod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/pod/pod.ts') diff --git a/server/models/pod/pod.ts b/server/models/pod/pod.ts index 4c6e63024..4fe7fda1c 100644 --- a/server/models/pod/pod.ts +++ b/server/models/pod/pod.ts @@ -96,12 +96,12 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da // ------------------------------ METHODS ------------------------------ -toFormatedJSON = function () { +toFormatedJSON = function (this: PodInstance) { const json = { id: this.id, host: this.host, email: this.email, - score: this.score, + score: this.score as number, createdAt: this.createdAt } -- cgit v1.2.3