toi bi ngu

This commit is contained in:
2024-11-17 20:27:33 +07:00
parent bb0eed1851
commit 3430971449
14 changed files with 675 additions and 82 deletions

View File

@@ -18,6 +18,12 @@ export class GraphqlService {
@Inject('REDIS_CLIENT') private readonly redis: RedisService,
) {}
async acquireContextFromSessionId(sessionId: string) {
return this.acquireContext({
headers: { 'x-session-id': sessionId },
} as unknown as Request)
}
async acquireContext(req: Request) {
// get x-session-id from headers
let sessionId: string