Skip to content

Commit

Permalink
delete old webhook code
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Nov 30, 2023
1 parent cd9ff08 commit 71ad1ca
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 374 deletions.
94 changes: 0 additions & 94 deletions WEBHOOKS.md

This file was deleted.

2 changes: 0 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ const defaults = {
STRIPE_SECRET: "rk_test_gRqwhv4xqv0a1olp8kk8fZ94", // for stripe payment processing (kept on server)
STRIPE_API_PLAN: "plan_CgLthOgwrDgz2K", // plan id for stripe metering
ES_SEARCH_PERCENT: 0, // % of users to roll out elasticsearch to
WEBHOOK_TIMEOUT: 1000, // Timeout in milliseconds when calling a webhook
WEBHOOK_FEED_INTERVAL: 2000, // Delay in milliseconds between reads from the match feed for the webhook handler.
TRACKED_ACCOUNT_URL: "", // URL where account IDs of tracked players can be found
};
// ensure that process.env has all values in defaults, but prefer the process.env value
Expand Down
8 changes: 0 additions & 8 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@
"exec_mode": "cluster",
"instances": 1
},
{
"script": "svc/webhooks.js",
"watch": true,
"ignore_watch": [".git", "node_modules"],
"group": "backend",
"exec_mode": "cluster",
"instances": 1
},
{
"script": "svc/scenarios.js",
"watch": true,
Expand Down
181 changes: 0 additions & 181 deletions routes/webhookManagement.js

This file was deleted.

6 changes: 0 additions & 6 deletions store/buildStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ module.exports = function buildStatus(db, redis, cb) {
skip_seq_num_last_day(cb) {
utility.getRedisCountDay(redis, "skip_seq_num", cb);
},
webhooks_last_day(cb) {
utility.getRedisCountDay(redis, "webhook", cb);
},
feed_last_day(cb) {
utility.getRedisCountDay(redis, "feed", cb);
},
api_hits_last_day(cb) {
utility.getRedisCountDay(redis, "api_hits", cb);
},
Expand Down
5 changes: 0 additions & 5 deletions store/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ function cleanRowCassandra(cassandra, table, row, cb) {
);
}

function getWebhooks(db) {
return db.select("url", "subscriptions").from("webhooks").stream();
}

function getAPIKeys(db, cb) {
db.raw(
`
Expand Down Expand Up @@ -1711,7 +1707,6 @@ module.exports = {
getMmrEstimate,
getPeers,
getProPeers,
getWebhooks,
getAPIKeys,
getItemTimings,
getLaneRoles,
Expand Down
3 changes: 0 additions & 3 deletions svc/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const passport = require("passport");
const SteamStrategy = require("passport-steam").Strategy;
const cors = require("cors");
const keys = require("../routes/keyManagement");
const webhooks = require("../routes/webhookManagement");
const api = require("../routes/api");
const queries = require("../store/queries");
const db = require("../store/db");
Expand Down Expand Up @@ -42,7 +41,6 @@ const whitelistedPaths = [
"/return",
"/api/admin/apiMetrics", // Admin metrics
"/keys", // API Key management
"/webhooks", // Webhook management
];

const pathCosts = {
Expand Down Expand Up @@ -350,7 +348,6 @@ app.route("/manageSub").post(async (req, res) => {
return res.json(session);
});
app.use("/api", api);
app.use("/webhooks", webhooks);
// CORS Preflight for API keys
// NB: make sure UI_HOST is set e.g. http://localhost:3000 otherwise CSRF check above will stop preflight from working
app.options("/keys", cors());
Expand Down
Loading

0 comments on commit 71ad1ca

Please sign in to comment.