17 lines
310 B
Python
17 lines
310 B
Python
|
from fastapi import APIRouter
|
||
|
from redis_db import ping
|
||
|
|
||
|
router = APIRouter()
|
||
|
|
||
|
|
||
|
@router.get("")
|
||
|
async def ping_post():
|
||
|
redis_ping = await ping()
|
||
|
return {"ok": True, "redis": redis_ping}
|
||
|
|
||
|
|
||
|
@router.post("")
|
||
|
async def ping_get():
|
||
|
redis_ping = await ping()
|
||
|
return {"ok": True, "redis": redis_ping}
|