"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const error_1=require("@b/utils/error"),query_1=require("./../../utils/query");exports.metadata={summary:"Retrieves session data by sessionId",operationId:"getSessionData",tags:["Session"],description:"Retrieves session data from Redis by sessionId",requiresAuth:!0,responses:{200:{description:"Session data retrieved successfully",content:{"application/json":{schema:{type:"string"}}}},401:query_1.unauthorizedResponse,404:(0,query_1.notFoundMetadataResponse)("Category"),500:query_1.serverErrorResponse}};exports.default=e=>{const{user:s,cookies:r}=e;if(!(null==s?void 0:s.id))throw(0,error_1.createError)(401,"Unauthorized");return r.accessToken};