Port list.services to TS

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-09-28 16:16:26 +01:00
parent 2417a7ba53
commit eab0c68792

View File

@ -1,15 +1,14 @@
const db = require("../services/dbAccess.services"); import { query } from "./dbAccess.services";
import { logger } from "../utils/logger.utils"; import { logger } from "../utils/logger.utils";
async function getStations() { async function getStations() {
var out = db.query("stations"); var out = query("stations");
logger.debug("listServices.getStations: Fetching stations list"); logger.debug("listServices.getStations: Fetching stations list");
return await out; return await out;
} }
async function getCorpus() { async function getCorpus() {
var out = db.query("corpus"); var out = query("corpus");
logger.debug("listServices.getCorpus: Fetching CORPUS list"); logger.debug("listServices.getCorpus: Fetching CORPUS list");
return await out; return await out;
} }