This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AtpAgent, AtpSessionData, RichText } from "@atproto/api"; | |
import { AppContext } from "types"; | |
class WorkerSessionManager { | |
constructor(private readonly ctx: AppContext) {} | |
async getSession(identifier: string): Promise<AtpSessionData | null> { | |
const sessionStr = await this.ctx.env.KVCACHE.get(`session:${identifier}`); | |
return sessionStr ? JSON.parse(sessionStr) : null; | |
} |
OlderNewer