Update code in endpoints/science.get.py
This commit is contained in:
parent
6a266940c2
commit
e3951cf7a9
43
endpoints/science.get.py
Normal file
43
endpoints/science.get.py
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user