Commit 09143acf by edems

ImagesController added

parent 43f875c4
from aiohttp import web
class ImagesController:
@staticmethod
def add_routes(app):
app.add_routes([
web.get('/images', ImagesController.list),
web.post('/images/upload', ImagesController.upload),
web.get('/images/{image}', ImagesController.get),
web.delete('/images/{image}/delete', ImagesController.delete)
])
@staticmethod
async def upload(request):
return web.Response(text='Upload')
@staticmethod
async def list(request):
return web.Response(text='List')
@staticmethod
async def get(request):
return web.Response(text='Get')
@staticmethod
async def delete(request):
return web.Response(text='Delete')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment