"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const db_1=require("@b/db"),utils_1=require("../utils"),query_1=require("@b/utils/query"),error_1=require("@b/utils/error");exports.metadata={summary:"Retrieves detailed information of a specific binary market by ID",operationId:"getBinaryMarketById",tags:["Admin","Binary Markets"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the binary market to retrieve",schema:{type:"string"}}],responses:{200:{description:"Binary market details",content:{"application/json":{schema:{type:"object",properties:utils_1.binaryMarketSchema}}}},401:query_1.unauthorizedResponse,404:(0,query_1.notFoundMetadataResponse)("Binary Market"),500:query_1.serverErrorResponse},permission:"view.binary.market",requiresAuth:!0};exports.default=async e=>{const{params:r}=e,{id:t}=r,a=await db_1.models.binaryMarket.findOne({where:{id:t}});if(!a)throw(0,error_1.createError)({statusCode:404,message:"Binary market not found"});return a};