🛂(app-desk) create fetchAPI

Create a fetch wrapper for the API calls, it will handle:
- add correct basename on the api request
- add Bearer automatically on the api request
- logout automatically on 401 request
This commit is contained in:
Anthony LC
2024-01-17 16:28:31 +01:00
committed by Anthony LC
parent da851f508a
commit c6823ba698
13 changed files with 104 additions and 34 deletions

View File

@@ -3194,6 +3194,11 @@ domexception@^4.0.0:
dependencies:
webidl-conversions "^7.0.0"
dotenv@16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
downshift@8.2.3:
version "8.2.3"
resolved "https://registry.yarnpkg.com/downshift/-/downshift-8.2.3.tgz#27106a5d9f408a6f6f9350ca465801d07e52db87"