diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-12-15 00:58:43 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-12-15 00:58:43 -0800 |
| commit | 2e41f030f02a336c2e9866d3d56b0494da5a622e (patch) | |
| tree | 226d7fe0f2e0d5af847c31d97c1ab9664d1b7e33 /src/server/index.ts | |
| parent | 9c9f35734e795e3c2cea21384349b655d7ffa164 (diff) | |
| download | posthook-2e41f030f02a336c2e9866d3d56b0494da5a622e.tar.gz posthook-2e41f030f02a336c2e9866d3d56b0494da5a622e.zip | |
Remove admin route in favor of a simpler toml format
Diffstat (limited to 'src/server/index.ts')
| -rw-r--r-- | src/server/index.ts | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index a38b47a..95358d4 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -14,12 +14,8 @@ import { } from '@emprespresso/pengueno'; import { Storage } from '../storage/index.js'; import { - ListRoutesActivityImpl, - RegisterRouteActivityImpl, TokenGenerateActivityImpl, WebhookActivityImpl, - type IListRoutesActivity, - type IRegisterRouteActivity, type ITokenGenerateActivity, type IWebhookActivity, } from '../activity/index.js'; @@ -89,10 +85,8 @@ export class PosthookServer implements Server { corsOriginsRaw: string = '*', healthCheck: HealthChecker = defaultHealthCheck, private readonly healthCheckActivity: IHealthCheckActivity = new HealthCheckActivityImpl(healthCheck), - private readonly registerRouteActivity: IRegisterRouteActivity = new RegisterRouteActivityImpl(storage), private readonly webhookActivity: IWebhookActivity = new WebhookActivityImpl(storage, signer), private readonly tokenGenerateActivity: ITokenGenerateActivity = new TokenGenerateActivityImpl(storage, signer), - private readonly listRoutesActivity: IListRoutesActivity = new ListRoutesActivityImpl(storage), private readonly fourOhFourActivity: IFourOhFourActivity = new FourOhFourActivityImpl(), private readonly corsOrigins: AllowedCorsOrigins = parseAllowedCorsOrigins(corsOriginsRaw), ) {} @@ -211,11 +205,6 @@ export class PosthookServer implements Server { if (hookMatch && method === 'POST') { const routeName = hookMatch[1]; result = this.webhookActivity.processWebhook(routeName)(req); - } else if (pathname === '/admin/routes' && method === 'POST') { - // === Admin Routes (/admin) - Put behind OAuth proxy === - result = this.registerRouteActivity.registerRoute(req); - } else if (pathname === '/admin/routes' && method === 'GET') { - result = this.listRoutesActivity.listRoutes(req); } else { // 404 for everything else result = this.fourOhFourActivity.fourOhFour(req); |
