From b0496dfed0d4f7e68d1d9910f9488577fffd5337 Mon Sep 17 00:00:00 2001 From: Fawaz Ahmed Date: Sat, 2 Mar 2024 10:19:36 +0530 Subject: [PATCH] Update MIGRATION.md --- MIGRATION.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MIGRATION.md b/MIGRATION.md index 1e41733..1851782 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -3,4 +3,14 @@ 2. change `date` from `YYYY-MM-DD` to `YYYY.M.D` . Eg: `2024-03-02` becomes `2024.3.2` -3. There is no `/currencies/{currencyCode}/{currencyCode}` endpoint in this new API, so please only use `/currencies/{currencyCode}` endpoint +3. There is no `/currencies/{currencyCode}/{currencyCode}` endpoint in this new API, so please only use `/currencies/{currencyCode}` endpoint. See example given below. + +```js +json = fetchJSON(`/currencies/{fromCurrency}/{toCurrency}`) +rate = json[toCurrency] +``` +becomes +```js +json = fetchJSON(`/currencies/{fromCurrency}`) +rate = json[fromCurrency][toCurrency] +```