I'm looking for help with HTMX. I writing a simple FastAPI app with HTMX and Tailwind and MongoDB database.
I have such a form:
<form id="currencyForm" hx-get="/currency_history_check/EUR" hx-target="#result" hx-swap="innerHTML">
<select name="currency_id" id="currency_id" onchange="updateFormAction()">
</select>
<button type="submit">Submit</button>
</form>
<div id="result">
</div>
And this script:
function updateFormAction() {
var selectedCurrency = document.getElementById("currency_id").value;
document.getElementById("currencyForm").setAttribute("hx-get", "/currency_history_check/" + selectedCurrency);
}
Even though the link changes, the result still remains the same

When I choose a currency from the select, it does change inside the HTML, however it always shows me EUR values as a return nonetheless.
Where do I make the mistake?
I managed to fix this. Turns out I had set up wrong API endpoints.
My previous one was:
And now I changed it to this:
There was something to do with Query and Path parameters