Liao Xuefeng's actual combat day9

The main change this time is to add a handler function to display the User data in the database in handler.py. code show as below

@get('/api/users')
async def api_get_users():
	users = await User.findAll(orderBy='created_at desc')
	for u in users:
		u.passwd = '******'
	return dict(users=users)

The browser interface display is as follows:


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324694597&siteId=291194637