Update code in endpoints/button.get.py
This commit is contained in:
parent
1658436999
commit
48c1e2db47
@ -0,0 +1,23 @@
|
|||||||
|
from fastapi import APIRouter, HTTPException
|
||||||
|
from fastapi.responses import JSONResponse
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
buttons = [] # In-memory storage
|
||||||
|
|
||||||
|
@router.get("/button")
|
||||||
|
async def get_button():
|
||||||
|
"""Demo button endpoint"""
|
||||||
|
return {
|
||||||
|
"message": "Button retrieved successfully",
|
||||||
|
"button": {
|
||||||
|
"id": "btn_123",
|
||||||
|
"label": "Click Me",
|
||||||
|
"color": "blue",
|
||||||
|
"enabled": True
|
||||||
|
},
|
||||||
|
"features": {
|
||||||
|
"clickable": True,
|
||||||
|
"visible": True
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user