"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:"Updates an existing binary order",operationId:"updateBinaryOrder",tags:["Admin","Binary Order"],parameters:[{index:0,name:"id",in:"path",description:"The ID of the binary order to update",required:!0,schema:{type:"string"}}],requestBody:{required:!0,description:"Updated data for the binary order",content:{"application/json":{schema:utils_1.binaryOrderUpdateSchema}}},responses:(0,query_1.updateRecordResponses)("Binary Order"),requiresAuth:!0,permission:"edit.binary.order",logModule:"ADMIN_FIN",logTitle:"Update Binary Order"};exports.default=async e=>{const{body:r,params:t,ctx:i}=e,{id:a}=t,{symbol:s,price:d,amount:o,profit:n,side:p,type:u,status:y,isDemo:c,closePrice:m}=r;return await(0,query_1.updateRecord)("binaryOrder",a,{symbol:s,price:d,amount:o,profit:n,side:p,type:u,status:y,isDemo:c,closePrice:m})};