From 7266137b9f00554f82f31c500c832446a2752fbd Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 18 Apr 2021 20:29:44 +0300 Subject: Add workflow --- src/index.ts | 4 +++- src/sheets.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/sheets.ts (limited to 'src') diff --git a/src/index.ts b/src/index.ts index 4edfc2f..3f0c7ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { App } from "@tinyhttp/app"; import { logger } from "@tinyhttp/logger"; import config from "./config"; +import { broadcast } from "./sheets"; import { bot } from "./tg"; const app = new App({ @@ -20,7 +21,8 @@ app .get("/", async (_, res) => { res.send({ service: "hommabot2 API" }); }) - .post("/scheduler/trigger", (_req, res) => { + .post("/scheduler/trigger", async (_req, res) => { + await broadcast(); res.send({ scheduler: "trigger" }); }); diff --git a/src/sheets.ts b/src/sheets.ts new file mode 100644 index 0000000..a03e349 --- /dev/null +++ b/src/sheets.ts @@ -0,0 +1,3 @@ +export const broadcast = async (): Promise => { + // TODO +}; -- cgit v1.3