def post(self): """创建 Redis 服务器 """ data = request.get_json() server,errors = ServerSchema().load(data) if errors: return errors,400 server.ping()
def post(self): data = request.get_json() server, erros = ServerSchema().load(data) if errors: return errors, 400 server.ping() server.save() return('ok':True},201
def post(self): """create Redis server""" data = request.get_json() server, errors = ServerSchema().load(data) if errors: return errors, 400 server.ping() server.save() return {'ok': True}, 201