11
This commit is contained in:
1 parent
14af390199
commit
48e0ac9d4f
3 files changed
+20
-6
No files matched your search
@@ -25,6 +25,7 @@ class MyTokenObtainPairSerializer(TokenObtainPairSerializer):
|
|||||||
token['user']=model_to_dict(user.userinfo)
|
token['user']=model_to_dict(user.userinfo)
|
||||||
token['user']['is_active']=user.is_active
|
token['user']['is_active']=user.is_active
|
||||||
token['user']['is_staff']=user.is_staff
|
token['user']['is_staff']=user.is_staff
|
||||||
|
# !ТУТ СДЕЛАТь ФОТО НАВЕРНОЕ
|
||||||
# token['user']['last_login']= user.last_login
|
# token['user']['last_login']= user.last_login
|
||||||
return token
|
return token
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ class CustomAuth(ModelBackend):
|
|||||||
password = kwargs['password']
|
password = kwargs['password']
|
||||||
status_code=0
|
status_code=0
|
||||||
# !ТУт стучим в AD, потом к Алексею
|
# !ТУт стучим в 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}))
|
resp= requests.post('http://10.252.44.13:8005/getAD', json.dumps({'user': username, 'password':password, 'usercheck': username}))
|
||||||
|
|
||||||
# if True:
|
# if True:
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -28,12 +28,25 @@ export function getfromserver(path, reactive){
|
|||||||
|
|
||||||
|
|
||||||
export function checkremote(filecheck){
|
export function checkremote(filecheck){
|
||||||
let tmp = new Image
|
|
||||||
tmp.src=filecheck
|
|
||||||
if(tmp.complete){
|
|
||||||
return filecheck
|
return filecheck
|
||||||
}
|
// try{
|
||||||
else {return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"}
|
// 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 {
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user