🛂(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

@@ -0,0 +1 @@
NEXT_PUBLIC_API_URL=/api/