create qr-codes by tg bot
Deploy app frontend / app frontend (push) Failing after 48s
Deploy db-migrations / db-migrations (push) Failing after 35s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Failing after 53s

This commit is contained in:
2024-12-10 13:21:38 +02:00
parent e9b3df38fe
commit 1810c550ba
91 changed files with 3317 additions and 1909 deletions
+23
View File
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.saveUpdateString = exports.saveUpdate = void 0;
var saveUpdate = function (doc, req) {
var token = req.headers["X-Telegram-Bot-Api-Secret-Token"];
if (token !== this.constants.telegram_secret_token) {
return [null, { code: 403, body: "Forbidden: Invalid token" }];
}
var data = JSON.parse(req.body);
if (doc) {
return [null, { code: 304, body: "Update already exists" }];
}
doc = {
_id: "tg_update:" + data.update_id.toString(),
type: "tg_update",
data: data,
created_at: new Date().toISOString(),
};
return [doc, "Message saved"];
};
exports.saveUpdate = saveUpdate;
exports.saveUpdateString = exports.saveUpdate.toString();
//# sourceMappingURL=saveUpdate.js.map