def add_app(request): json_app = yield from request.text() app = json.loads(json_app) result = models.add_row(models.App, app) if(result): return web.Response(status=200,body=encode_msg("success")) else: return web.Response(status=200,body=encode_msg("fail"))
def add_cron(request): json_cron = yield from request.text() cron = json.loads(json_cron) result = models.add_row(models.Cron, cron) if(result): return web.Response(status=200,body=encode_msg("success")) else: return web.Response(status=200,body=encode_msg("fail"))
def add_policy(request): json_policy = yield from request.text() policy = json.loads(json_policy) result = models.add_row(models.Policy, policy) if(result): return web.Response(status=200,body=encode_msg("success")) else: return web.Response(status=200,body=encode_msg("fail"))
def add_cron(request): json_cron = yield from request.text() cron = json.loads(json_cron) result = models.add_row(models.Cron, cron) if (result): return web.Response(status=200, body=encode_msg("success")) else: return web.Response(status=200, body=encode_msg("fail"))
def add_policy(request): json_policy = yield from request.text() policy = json.loads(json_policy) result = models.add_row(models.Policy, policy) if (result): return web.Response(status=200, body=encode_msg("success")) else: return web.Response(status=200, body=encode_msg("fail"))
def add_app(request): json_app = yield from request.text() app = json.loads(json_app) result = models.add_row(models.App, app) if (result): return web.Response(status=200, body=encode_msg("success")) else: return web.Response(status=200, body=encode_msg("fail"))