todo-backend / api\test.py
muhammadshaheryar's picture
Upload api\test.py with huggingface_hub
115535a verified
raw
history blame contribute delete
557 Bytes
import json
def handler(request):
return {
"statusCode": 200,
"headers": {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type, Authorization"
},
"body": json.dumps({"message": "Test API route working", "status": "success"})
}
# For Vercel Python API Routes, export the handler function
handler.__name__ = 'handler'