From 8c4621ec97a064245cafcc068c366133c38b94b0 Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Sat, 6 Jun 2020 23:06:12 +0200 Subject: [PATCH] Changed API path to v2 instead of v2.0 We discussed whether the minor-version is relevant for the API base-path and came to the conclusion, that it's not really needed as breaking API changes need a new major version anyway. This commit also removes the trailing slash from the URL which is returned by `getBackendUrl`. This is needed as we composed the API routes in our implementation always with a starting slash thus leading to double slashes. Example of old behaviour: getBackendUrl() + '/config' => example.com/api/v2.0//config Example of new behaviuor: getBackendUrl() + '/config' => example.com/api/v2/config --- public/api/{v2.0 => v2}/config | 0 src/redux/frontend-config/methods.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename public/api/{v2.0 => v2}/config (100%) diff --git a/public/api/v2.0/config b/public/api/v2/config similarity index 100% rename from public/api/v2.0/config rename to public/api/v2/config diff --git a/src/redux/frontend-config/methods.ts b/src/redux/frontend-config/methods.ts index 7986cac5c..787d36bed 100644 --- a/src/redux/frontend-config/methods.ts +++ b/src/redux/frontend-config/methods.ts @@ -7,7 +7,7 @@ export const setFrontendConfig = (state: FrontendConfig): void => { type: FrontendConfigActionType.SET_FRONTEND_CONFIG, state: { ...state, - backendUrl: state.backendUrl + '/api/v2.0/' + backendUrl: state.backendUrl + '/api/v2' } } store.dispatch(action)