aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2021-04-18 20:29:44 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2021-04-18 20:29:44 +0300
commit7266137b9f00554f82f31c500c832446a2752fbd (patch)
tree30d8d907b43e476a4fb7db6fc03a02e6c8508a4b /src/index.ts
parentcf2e3c99ded0f48bd565858aedc7f10a0d932a61 (diff)
Add workflow
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts4
1 files changed, 3 insertions, 1 deletions
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" });
});