aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
parentcf2e3c99ded0f48bd565858aedc7f10a0d932a61 (diff)
Add workflow
Diffstat (limited to 'src')
-rw-r--r--src/index.ts4
-rw-r--r--src/sheets.ts3
2 files changed, 6 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" });
});
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<void> => {
+ // TODO
+};