WIP: add basic image util to retrieve data
1 files changed, 8 insertions(+), 0 deletions(-) A src/utils/imageUtils.ts
A src/utils/imageUtils.ts => src/utils/imageUtils.ts +8 -0
@@ 0,0 1,8 @@ +import {ImageTable} from "../types/dbTypes"; +import {dbConn} from "./dbUtils"; + +export const fetchImages = async (): Promise<readonly ImageTable[]> => { + const db = dbConn(); + + return await db<ImageTable>('images').select('*'); +}< \ No newline at end of file