Update code in endpoints/science.get.py

This commit is contained in:
Backend IM Bot 2025-03-21 21:17:15 +01:00
parent 6a266940c2
commit e3951cf7a9

43
endpoints/science.get.py Normal file
View File

@ -0,0 +1,43 @@
from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db
router = APIRouter()
@router.get("/science")
async def science_handler():
"""Returns list of all backend languages"""
backend_languages = [
{
"name": "Python",
"framework": "Django, Flask, FastAPI"
},
{
"name": "JavaScript",
"framework": "Node.js, Express.js"
},
{
"name": "Java",
"framework": "Spring"
},
{
"name": "Ruby",
"framework": "Ruby on Rails"
},
{
"name": "PHP",
"framework": "Laravel"
},
{
"name": "C#",
"framework": "ASP.NET"
},
{
"name": "Go",
"framework": "Gin, Beego"
}
]
return {
"message": "List of backend languages",
"data": backend_languages
}