Skip to content

Commit

Permalink
chore: remove deprecated routes (#188)
Browse files Browse the repository at this point in the history
## Motivation

The `/connect/*` routes on the relay are deprecated. According to our
logs, nobody is calling them. Warpcast is still calling
`/connect/authenticate`, which we should update in a separate change.

## Change Summary

Remove `/connect/*` routes from relay server.

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [x] PR has a changeset
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes documentation if necessary
- [x] All commits have been signed
  • Loading branch information
horsefacts authored Aug 14, 2024
1 parent b4178d2 commit fb16a2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-dryers-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/auth-relay": minor
---

chore: remove deprecated routes
12 changes: 0 additions & 12 deletions apps/relay/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ export class RelayServer {
next();
});

v1.register(async (publicRoutes, _opts, next) => {
await publicRoutes.register(rateLimit);
publicRoutes.post<{ Body: CreateChannelRequest }>(
"/connect",
{ schema: { body: createChannelRequestSchema } },
createChannel,
);
next();
});

v1.register((protectedRoutes, _opts, next) => {
protectedRoutes.decorateRequest("channelToken", "");
protectedRoutes.addHook("preHandler", async (request, reply) => {
Expand All @@ -88,8 +78,6 @@ export class RelayServer {
Body: AuthenticateRequest;
}>("/connect/authenticate", { schema: { body: authenticateRequestSchema } }, authenticate);

protectedRoutes.get("/connect/status", status);

protectedRoutes.post<{
Body: AuthenticateRequest;
}>("/channel/authenticate", { schema: { body: authenticateRequestSchema } }, authenticate);
Expand Down

0 comments on commit fb16a2c

Please sign in to comment.