-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
101 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
''' | ||
__init__.py | ||
---- | ||
Public asset router | ||
@Time : 2024/05/21 16:08:53 | ||
@Author : Mattholy | ||
@Version : 1.0 | ||
@Contact : [email protected] | ||
@License : MIT License | ||
''' | ||
|
||
import uuid | ||
from fastapi import APIRouter | ||
from fastapi.responses import FileResponse | ||
|
||
router = APIRouter(prefix='/asset', tags=['Assets']) | ||
|
||
|
||
@router.get('/{res_id: uuid.UUID}', response_class=FileResponse) | ||
async def fetch_public_asset(res_id: uuid.UUID): | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- encoding: utf-8 -*- | ||
''' | ||
router.py | ||
---- | ||
put some words here | ||
@Time : 2024/05/21 16:06:41 | ||
@Author : Mattholy | ||
@Version : 1.0 | ||
@Contact : [email protected] | ||
@License : MIT License | ||
''' | ||
|
||
from fastapi import APIRouter | ||
from routers.public.asset import router as asset_router | ||
|
||
from env import PUBLIC_BASE_URL | ||
|
||
router = APIRouter(prefix=PUBLIC_BASE_URL, tags=['Public Access']) | ||
|
||
router.include_router(asset_router) |
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