From fe5fe810565d72959f939b18221e50ff921e5b69 Mon Sep 17 00:00:00 2001 From: Amy Fromandi Date: Tue, 23 Jul 2024 15:35:47 -0500 Subject: [PATCH] Paleogeography is repointed, however, we need to test this live in development UI --- v2/paleogeography.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2/paleogeography.ts b/v2/paleogeography.ts index 2d788e6a..a3f9ca65 100644 --- a/v2/paleogeography.ts +++ b/v2/paleogeography.ts @@ -2,7 +2,7 @@ var api = require("./api"), async = require("async"), dbgeo = require("dbgeo"), larkin = require("./larkin"); - +//TODO test this endpoint. cannot test error: relation "earthbyte2013_raw.reconstructed_2" does not exist module.exports = function (req, res, next) { if (!req.query.age && !req.query.interval_name && !("sample" in req.query)) { larkin.info(req, res, next); @@ -24,7 +24,7 @@ module.exports = function (req, res, next) { callback(error); } else { if (result.length === 1) { - callback(null, parseInt(result.rows[0].mid)); + callback(null, parseInt(result[0].mid)); } else { larkin.error(req, res, next, "interval not found"); } @@ -46,7 +46,7 @@ module.exports = function (req, res, next) { limit, [], function (error, result) { - callback(null, result.rows); + callback(null, result); }, ); }, @@ -79,7 +79,7 @@ module.exports = function (req, res, next) { : false, }, { - data: result.rows, + data: result, }, ); }