"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 a specific currency by symbol",operationId:"updateCurrencyBySymbol",tags:["Admin","Currencies"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the user to update",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:utils_1.fiatCurrencyUpdateSchema}}},responses:(0,query_1.updateRecordResponses)("Fiat Currency"),requiresAuth:!0,permission:"edit.fiat.currency",logModule:"ADMIN_FIN",logTitle:"Update fiat currency"};exports.default=async e=>{const{params:r,body:t,ctx:s}=e,{id:u}=r,{price:c}=t;null==s||s.step("Fetching fiat currency record");null==s||s.step("Updating fiat currency");const a=await(0,query_1.updateRecord)("currency",u,{price:c});null==s||s.success("Fiat currency updated successfully");return a};