-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
771fac0
commit 25eead6
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from aiohttp import web | ||
|
||
group = web.Application() | ||
routes = web.RouteTableDef() | ||
|
||
@routes.post('/') | ||
async def main(request): | ||
return web.Response(text='Access all club/society endpoints through here!') | ||
|
||
group.router.add_routes(routes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from aiohttp import web | ||
|
||
from api.group import group | ||
|
||
|
||
app = web.Application() | ||
routes = web.RouteTableDef() | ||
|
||
app.add_subapp('/group', group) | ||
|
||
@routes.post('/') | ||
async def main(request): | ||
return web.json_response({ | ||
'message': f"Logged in as {request.config_dict['bot'].user}", | ||
}) | ||
|
||
app.router.add_routes(routes) |