-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for frontend subroutes not being served
[backend] created constant for frontend path [backend] add new constant to routes path logic [backend] adjusted fallback routes for frontend [backend] added fallback routes for api/v1 and user_images [frontend] fixed avatar component based on new route logic for user_images
- Loading branch information
1 parent
8c5379a
commit ad8a4ae
Showing
5 changed files
with
32 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
from fastapi.responses import RedirectResponse | ||
from fastapi.responses import FileResponse | ||
|
||
def return_frontend_index(): | ||
return RedirectResponse(url="/index.html") | ||
def return_frontend_index(path: str): | ||
return FileResponse("/app/frontend/dist/" + path) | ||
|
||
|
||
def return_user_img_path(user_img: str): | ||
return FileResponse("/app/backend/user_images/" + user_img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters