diff options
Diffstat (limited to 'server/controllers/api/pods.ts')
-rw-r--r-- | server/controllers/api/pods.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/pods.ts b/server/controllers/api/pods.ts index 55a7df661..5210f9fe4 100644 --- a/server/controllers/api/pods.ts +++ b/server/controllers/api/pods.ts | |||
@@ -23,6 +23,7 @@ import { | |||
23 | import { | 23 | import { |
24 | PodInstance | 24 | PodInstance |
25 | } from '../../models' | 25 | } from '../../models' |
26 | import { Pod as FormatedPod } from '../../../shared' | ||
26 | 27 | ||
27 | const podsRouter = express.Router() | 28 | const podsRouter = express.Router() |
28 | 29 | ||
@@ -72,7 +73,7 @@ function addPods (req: express.Request, res: express.Response, next: express.Nex | |||
72 | 73 | ||
73 | function listPods (req: express.Request, res: express.Response, next: express.NextFunction) { | 74 | function listPods (req: express.Request, res: express.Response, next: express.NextFunction) { |
74 | db.Pod.list() | 75 | db.Pod.list() |
75 | .then(podsList => res.json(getFormatedObjects(podsList, podsList.length))) | 76 | .then(podsList => res.json(getFormatedObjects<FormatedPod, PodInstance>(podsList, podsList.length))) |
76 | .catch(err => next(err)) | 77 | .catch(err => next(err)) |
77 | } | 78 | } |
78 | 79 | ||