From ec83d93a7104d8b64cfc674c39daf6d0aabc3615 Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti (DN0)" Date: Wed, 19 Apr 2023 15:37:53 +0300 Subject: [PATCH] WIP: add basic image util to retrieve data --- src/utils/imageUtils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/utils/imageUtils.ts diff --git a/src/utils/imageUtils.ts b/src/utils/imageUtils.ts new file mode 100644 index 0000000..b4c5727 --- /dev/null +++ b/src/utils/imageUtils.ts @@ -0,0 +1,8 @@ +import {ImageTable} from "../types/dbTypes"; +import {dbConn} from "./dbUtils"; + +export const fetchImages = async (): Promise => { + const db = dbConn(); + + return await db('images').select('*'); +} \ No newline at end of file -- 2.45.2