From 6392b69abfc6cfec25cd8a5a4b49f71a20d1f481 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 26 Nov 2021 17:42:53 +0800 Subject: [PATCH] U update --- spug_api/apps/apis/deploy.py | 1 - spug_api/consumer/middleware.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/spug_api/apps/apis/deploy.py b/spug_api/apps/apis/deploy.py index 19eed80..37b0a5a 100644 --- a/spug_api/apps/apis/deploy.py +++ b/spug_api/apps/apis/deploy.py @@ -5,7 +5,6 @@ from django.http.response import HttpResponseBadRequest, HttpResponseForbidden, from apps.setting.utils import AppSetting from apps.deploy.models import Deploy, DeployRequest from apps.repository.models import Repository -from apps.repository.utils import dispatch as build_dispatch from apps.deploy.utils import dispatch as deploy_dispatch from threading import Thread import hashlib diff --git a/spug_api/consumer/middleware.py b/spug_api/consumer/middleware.py index af4a48e..8d62bd4 100644 --- a/spug_api/consumer/middleware.py +++ b/spug_api/consumer/middleware.py @@ -44,5 +44,5 @@ class AuthMiddleware: if user and x_real_ip == user.last_ip and user.token_expired >= time.time() and user.is_active: scope['user'] = user return True, None - return False, f'IP verify failed: {x_real_ip} <> {user.last_ip}' + return False, f'Verify failed: {x_real_ip} <> {user.last_ip}' return False, 'Token is invalid'