"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query"),utils_1=require("@b/api/admin/finance/exchange/market/utils");exports.metadata={summary:"Updates a specific exchange market",operationId:"updateExchangeMarket",tags:["Admin","Exchange","Markets"],parameters:[{index:0,name:"id",in:"path",description:"ID of the market to update",required:!0,schema:{type:"string"}}],requestBody:{description:"New data for the market",content:{"application/json":{schema:utils_1.MarketUpdateSchema}}},responses:(0,query_1.updateRecordResponses)("Market"),requiresAuth:!0,permission:"edit.exchange.market",logModule:"ADMIN_FIN",logTitle:"Update Exchange Market"};exports.default=async e=>{const{body:t,params:a,ctx:r}=e,{id:s}=a,{currency:i,pair:n,metadata:d,isTrending:c,isHot:o}=t;null==r||r.step("Updating exchange market");const p=await(0,query_1.updateRecord)("exchangeMarket",s,{currency:i,pair:n,metadata:d,isTrending:c,isHot:o});null==r||r.success();return p};