"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query"),utils_1=require("../utils");exports.metadata={summary:"Retrieves detailed information of a specific author by ID",operationId:"getAuthorById",tags:["Admin","Content","Author"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the author to retrieve",schema:{type:"string"}}],responses:{200:{description:"Author details",content:{"application/json":{schema:{type:"object",properties:utils_1.baseAuthorSchema}}}},401:query_1.unauthorizedResponse,404:(0,query_1.notFoundMetadataResponse)("Author"),500:query_1.serverErrorResponse},permission:"view.blog.author",requiresAuth:!0,logModule:"ADMIN_BLOG",logTitle:"Get author by ID"};exports.default=async e=>{const{params:t,ctx:r}=e;null==r||r.step("Validating author ID");null==r||r.step("Fetching author");const o=await(0,query_1.getRecord)("author",t.id);null==r||r.success("Author retrieved successfully");return o};