def post(self): data = get_json_request_body(self) self.write(user_api.generate_token(self.db, data))
def get(self): # self.render('api-token.html') self.write( user_api.generate_token(self.db, {'email': self.current_user}))