From 63662a6074aaba7105abb47617ae1c62c3a28dc8 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 27 Oct 2023 16:18:49 +0100 Subject: [PATCH] fix a silly --- src/services/api.ts | 1 + src/utils/timeUtils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/api.ts b/src/services/api.ts index bf63276..ef0e4f9 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -1,6 +1,7 @@ import express from "express"; import { INFLUXDB_BUCKET, InfluxQueryAPI } from "../index"; import { formatString } from "../utils/stringUtils"; +import { parseTimeToMilliseconds } from "../utils/timeUtils"; const app = express(); const port = process.env.PORT || 3000; diff --git a/src/utils/timeUtils.ts b/src/utils/timeUtils.ts index fa0ddc3..dde1d7a 100644 --- a/src/utils/timeUtils.ts +++ b/src/utils/timeUtils.ts @@ -4,7 +4,7 @@ * @param time the time to parse * @returns the time in milliseconds */ -function parseTimeToMilliseconds(time: string) { +export function parseTimeToMilliseconds(time: string) { // Regular expression to match the numeric value and unit const regex = /^(\d+)([smhdwMy])$/;