aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pod
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/pod')
-rw-r--r--server/models/pod/pod-interface.ts6
-rw-r--r--server/models/pod/pod.ts6
2 files changed, 6 insertions, 6 deletions
diff --git a/server/models/pod/pod-interface.ts b/server/models/pod/pod-interface.ts
index 340d4f1a7..8b0b72167 100644
--- a/server/models/pod/pod-interface.ts
+++ b/server/models/pod/pod-interface.ts
@@ -2,10 +2,10 @@ import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird' 2import * as Promise from 'bluebird'
3 3
4// Don't use barrel, import just what we need 4// Don't use barrel, import just what we need
5import { Pod as FormatedPod } from '../../../shared/models/pods/pod.model' 5import { Pod as FormattedPod } from '../../../shared/models/pods/pod.model'
6 6
7export namespace PodMethods { 7export namespace PodMethods {
8 export type ToFormatedJSON = (this: PodInstance) => FormatedPod 8 export type ToFormattedJSON = (this: PodInstance) => FormattedPod
9 9
10 export type CountAll = () => Promise<number> 10 export type CountAll = () => Promise<number>
11 11
@@ -53,7 +53,7 @@ export interface PodInstance extends PodClass, PodAttributes, Sequelize.Instance
53 createdAt: Date 53 createdAt: Date
54 updatedAt: Date 54 updatedAt: Date
55 55
56 toFormatedJSON: PodMethods.ToFormatedJSON, 56 toFormattedJSON: PodMethods.ToFormattedJSON,
57} 57}
58 58
59export interface PodModel extends PodClass, Sequelize.Model<PodInstance, PodAttributes> {} 59export interface PodModel extends PodClass, Sequelize.Model<PodInstance, PodAttributes> {}
diff --git a/server/models/pod/pod.ts b/server/models/pod/pod.ts
index e1088977f..56918e358 100644
--- a/server/models/pod/pod.ts
+++ b/server/models/pod/pod.ts
@@ -13,7 +13,7 @@ import {
13} from './pod-interface' 13} from './pod-interface'
14 14
15let Pod: Sequelize.Model<PodInstance, PodAttributes> 15let Pod: Sequelize.Model<PodInstance, PodAttributes>
16let toFormatedJSON: PodMethods.ToFormatedJSON 16let toFormattedJSON: PodMethods.ToFormattedJSON
17let countAll: PodMethods.CountAll 17let countAll: PodMethods.CountAll
18let incrementScores: PodMethods.IncrementScores 18let incrementScores: PodMethods.IncrementScores
19let list: PodMethods.List 19let list: PodMethods.List
@@ -86,7 +86,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da
86 updatePodsScore, 86 updatePodsScore,
87 removeAll 87 removeAll
88 ] 88 ]
89 const instanceMethods = [ toFormatedJSON ] 89 const instanceMethods = [ toFormattedJSON ]
90 addMethodsToModel(Pod, classMethods, instanceMethods) 90 addMethodsToModel(Pod, classMethods, instanceMethods)
91 91
92 return Pod 92 return Pod
@@ -94,7 +94,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da
94 94
95// ------------------------------ METHODS ------------------------------ 95// ------------------------------ METHODS ------------------------------
96 96
97toFormatedJSON = function (this: PodInstance) { 97toFormattedJSON = function (this: PodInstance) {
98 const json = { 98 const json = {
99 id: this.id, 99 id: this.id,
100 host: this.host, 100 host: this.host,