@ -9,6 +9,7 @@ use crate::{
api ::{ ApiResult , EmptyResult , UpdateType } ,
db ::models ::{ Cipher , Device , Folder , Send , User } ,
http_client ::make_http_request ,
util ::format_date ,
CONFIG ,
} ;
@ -170,10 +171,10 @@ pub async fn push_cipher_update(
"identifier" : acting_device_uuid ,
"type" : ut as i32 ,
"payload" : {
" i d": cipher . uuid ,
" u serId": cipher . user_uuid ,
" o rganizationId": ( ) ,
" revisionDate": cipher . updated_at
" I d": cipher . uuid ,
" U serId": cipher . user_uuid ,
" O rganizationId": ( ) ,
" RevisionDate": format_date ( & cipher . updated_at )
}
} ) )
. await ;
@ -190,8 +191,8 @@ pub fn push_logout(user: &User, acting_device_uuid: Option<String>) {
"identifier" : acting_device_uuid ,
"type" : UpdateType ::LogOut as i32 ,
"payload" : {
" u serId": user . uuid ,
" date": user . updated_at
" U serId": user . uuid ,
" Date": format_date ( & user . updated_at )
}
} ) ) ) ;
}
@ -204,8 +205,8 @@ pub fn push_user_update(ut: UpdateType, user: &User) {
"identifier" : ( ) ,
"type" : ut as i32 ,
"payload" : {
" u serId": user . uuid ,
" date": user . updated_at
" U serId": user . uuid ,
" Date": format_date ( & user . updated_at )
}
} ) ) ) ;
}
@ -224,9 +225,9 @@ pub async fn push_folder_update(
"identifier" : acting_device_uuid ,
"type" : ut as i32 ,
"payload" : {
" i d": folder . uuid ,
" u serId": folder . user_uuid ,
" revisionDate": folder . updated_at
" I d": folder . uuid ,
" U serId": folder . user_uuid ,
" RevisionDate": format_date ( & folder . updated_at )
}
} ) ) ) ;
}
@ -242,9 +243,9 @@ pub async fn push_send_update(ut: UpdateType, send: &Send, acting_device_uuid: &
"identifier" : acting_device_uuid ,
"type" : ut as i32 ,
"payload" : {
" i d": send . uuid ,
" u serId": send . user_uuid ,
" revisionDate": send . revision_date
" I d": send . uuid ,
" U serId": send . user_uuid ,
" RevisionDate": format_date ( & send . revision_date )
}
} ) ) ) ;
}
@ -295,8 +296,8 @@ pub async fn push_auth_request(user_uuid: String, auth_request_uuid: String, con
"identifier" : null ,
"type" : UpdateType ::AuthRequest as i32 ,
"payload" : {
" i d": auth_request_uuid ,
" u serId": user_uuid ,
" I d": auth_request_uuid ,
" U serId": user_uuid ,
}
} ) ) ) ;
}
@ -316,8 +317,8 @@ pub async fn push_auth_response(
"identifier" : approving_device_uuid ,
"type" : UpdateType ::AuthRequestResponse as i32 ,
"payload" : {
" i d": auth_request_uuid ,
" u serId": user_uuid ,
" I d": auth_request_uuid ,
" U serId": user_uuid ,
}
} ) ) ) ;
}