"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Updates the status of an exchange currency",operationId:"updateExchangeCurrencyStatus",tags:["Admin","Exchange Currencies"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the exchange currency to update",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{status:{type:"boolean",description:"New status to apply (true for active, false for inactive)"}},required:["status"]}}}},responses:(0,query_1.updateRecordResponses)("Exchange Currency"),requiresAuth:!0,permission:"edit.spot.currency",logModule:"ADMIN_FIN",logTitle:"Update spot currency status"};exports.default=async e=>{const{body:t,params:s,ctx:r}=e,{id:a}=s,{status:u}=t;null==r||r.step("Fetching spot currency record");null==r||r.step("Updating spot currency status");const c=await(0,query_1.updateStatus)("exchangeCurrency",a,u);null==r||r.success("Spot currency status updated successfully");return c};