diff --git a/accounts/backends.py b/accounts/backends.py index 8c9caa851..91674a051 100644 --- a/accounts/backends.py +++ b/accounts/backends.py @@ -25,6 +25,7 @@ class MyTokenObtainPairSerializer(TokenObtainPairSerializer): token['user']=model_to_dict(user.userinfo) token['user']['is_active']=user.is_active token['user']['is_staff']=user.is_staff + # !ТУТ СДЕЛАТь ФОТО НАВЕРНОЕ # token['user']['last_login']= user.last_login return token @@ -41,7 +42,7 @@ class CustomAuth(ModelBackend): password = kwargs['password'] status_code=0 # !ТУт стучим в AD, потом к Алексею - if settings.DEBUG!=True: + if settings.myDEBUG!=True: resp= requests.post('http://10.252.44.13:8005/getAD', json.dumps({'user': username, 'password':password, 'usercheck': username})) # if True: diff --git a/db.sqlite3 b/db.sqlite3 index b99df7b5b..adb73f376 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/front/src/utils/universal_functions.js b/front/src/utils/universal_functions.js index a988f0425..5aa1481ad 100644 --- a/front/src/utils/universal_functions.js +++ b/front/src/utils/universal_functions.js @@ -28,12 +28,25 @@ export function getfromserver(path, reactive){ export function checkremote(filecheck){ - let tmp = new Image - tmp.src=filecheck - if(tmp.complete){ - return filecheck - } - else {return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"} + return filecheck + // try{ + // let http = new XMLHttpRequest(); + // http.open('HEAD', filecheck, false); + // http.send(); + // console.log(http.status) + // return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg" + // } + // catch(e){ + // return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg" + // } + // let tmp = new Image + // tmp.src=filecheck + // if(tmp.complete){ + // return filecheck + // } + // else { + + // } }