"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 category by ID",operationId:"getCategoryById",tags:["Admin","Content","Category"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the category to retrieve",schema:{type:"string"}}],responses:{200:{description:"Category details",content:{"application/json":{schema:{type:"object",properties:utils_1.baseCategorySchema}}}},401:query_1.unauthorizedResponse,404:(0,query_1.notFoundMetadataResponse)("Category"),500:query_1.serverErrorResponse},permission:"view.blog.category",requiresAuth:!0,logModule:"ADMIN_BLOG",logTitle:"Get category by ID"};exports.default=async e=>{const{params:t,ctx:r}=e;null==r||r.step("Validating category ID");null==r||r.step("Fetching category");const o=await(0,query_1.getRecord)("category",t.id);null==r||r.success("Category retrieved successfully");return o};