fix method naming conflict

This commit is contained in:
narzeja 2016-10-22 08:40:24 +02:00
parent 22876b31b1
commit 0e2c092ce3

View File

@ -50,13 +50,13 @@ objects.database.allow_sync = False # this will raise AssertionError on ANY sync
app = Sanic('peewee_example')
@app.route('/post')
async def root(request):
async def post(request):
await objects.create(KeyValue, key='my_first_async_db', text="I was inserted asynchronously!")
return json({'success': True})
@app.route('/get')
async def root(request):
async def get(request):
all_objects = await objects.execute(KeyValue.select())
serialized_obj = []
for obj in all_objects: