10 lines
280 B
Python
10 lines
280 B
Python
|
from aiohttp import web
|
||
|
import auth
|
||
|
import json
|
||
|
|
||
|
async def servers(request):
|
||
|
user = auth.authenticate(request)
|
||
|
if(user is not None):
|
||
|
data = json.dumps(user['servers'])
|
||
|
return web.json_response(data=data ,status=200)
|
||
|
return web.json_response(status=403)
|