grain.social is a photo sharing platform built on atproto.

feat: remove unused OAuth session route from middleware

Changed files
-11
src
api
-11
src/api/mod.ts
··· 64 64 import { getGalleryComments } from "../modules/comments.tsx"; 65 65 66 66 export const middlewares: BffMiddleware[] = [ 67 - route("/oauth/session", (_req, _params, ctx) => { 68 - if (!ctx.currentUser) { 69 - return ctx.json({ messgae: "Unauthorized" }, 401); 70 - } 71 - const did = ctx.currentUser.did; 72 - const session = ctx.indexService.getSession(did); 73 - if (!session) { 74 - return ctx.json({ message: "Session not found" }, 404); 75 - } 76 - return ctx.json(session); 77 - }), 78 67 route("/xrpc/social.grain.actor.getProfile", (req, _params, ctx) => { 79 68 const url = new URL(req.url); 80 69 const { actor } = getProfileQueryParams(url);