From 32803c441678cd640e46153688d26c4c0746d7b3 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Wed, 15 Feb 2023 18:03:46 -0700 Subject: We do a little logging, but cringe OpenAPI errors be making me want to shoot myself. We have some shit working though. --- src/actions.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/actions.js (limited to 'src/actions.js') diff --git a/src/actions.js b/src/actions.js new file mode 100644 index 0000000..37b64f4 --- /dev/null +++ b/src/actions.js @@ -0,0 +1,11 @@ +import * as aggietime from "./aggietime.js"; + +const ACTIONS = { + "clock-in": aggietime.clock_in, +}; + +export const do_action = async (body) => { + const { action, rest } = body; + + return await ACTIONS[action](rest); +}; -- cgit v1.2.3-70-g09d2