Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
I should start testing
Browse files Browse the repository at this point in the history
  • Loading branch information
spookybear0 committed Oct 2, 2020
1 parent bc907c0 commit aa4e8c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions api/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from aiohttp import web
from routes import user_handler
#from aiohttp import web
#from .routes import user_handler

app = web.Application()
#app = web.Application()

app.router.add_post("/user/{userid}", user_handler)
#app.router.add_post("/user/{userid}", user_handler)
12 changes: 6 additions & 6 deletions api/routes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import aiohttp
from gdpys.helpers.userhelper import user_helper
#import aiohttp
#from helpers.userhelper import user_helper

async def user_handler(request:aiohttp.web.Request):
user = request.match_info["userid"]
print(type(user))
return user_helper.get_object(user)
#async def user_handler(request:aiohttp.web.Request):
# user = request.match_info["userid"]
# print(type(user))
# return user_helper.get_object(user)
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from constants import ASCII_ART, Colours
from conn.mysql import create_connection
from os import path
from api.main import app as api
#from api.main import app as api
from tools.main import tools
import os
import importlib
Expand Down

0 comments on commit aa4e8c2

Please sign in to comment.