11
This commit is contained in:
1 parent
14af390199
commit
48e0ac9d4f
3 files changed
+21
-7
No files matched your search
@@ -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:
|
||||
|
||||
BIN
Binary file not shown.
@@ -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 {
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user