-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from dataforgoodfr/feat_dashboard_metric_endp…
…oints_204 feat: add /api/v1 prefix for all API endpoints in prevision of multiple versions
- Loading branch information
Showing
6 changed files
with
58 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from fastapi import APIRouter, Depends, Request | ||
from bloom.config import settings | ||
import redis | ||
from bloom.config import settings | ||
from bloom.logger import logger | ||
from bloom.dependencies import (X_API_KEY_HEADER,check_apikey) | ||
|
||
router = APIRouter() | ||
rd = redis.Redis(host=settings.redis_host, port=settings.redis_port, db=0) | ||
|
||
@router.get("/cache/all/flush") | ||
async def cache_all_flush(request:Request,key: str = Depends(X_API_KEY_HEADER)): | ||
check_apikey(key) | ||
rd.flushall() | ||
return {"code":0} |
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