mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-20 15:01:19 +00:00
refactor: no restrict access arg
This commit is contained in:
parent
3e2481e336
commit
1a95f46ba1
3 changed files with 2 additions and 9 deletions
|
|
@ -167,8 +167,7 @@ pub async fn get_candidate(
|
|||
let details = ApplicationService::decrypt_all_details(
|
||||
private_key,
|
||||
db,
|
||||
&application,
|
||||
false,
|
||||
&application
|
||||
)
|
||||
.await
|
||||
.map_err(to_custom_error)?;
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ pub async fn get_details(
|
|||
let details = ApplicationService::decrypt_all_details(
|
||||
private_key,
|
||||
db,
|
||||
&application,
|
||||
true
|
||||
&application
|
||||
)
|
||||
.await
|
||||
.map(|x| Json(x))
|
||||
|
|
|
|||
|
|
@ -215,14 +215,9 @@ impl ApplicationService {
|
|||
private_key: String,
|
||||
db: &DbConn,
|
||||
application: &application::Model,
|
||||
restrict_access: bool,
|
||||
) -> Result<ApplicationDetails, ServiceError> {
|
||||
let candidate = ApplicationService::find_related_candidate(db, application).await?;
|
||||
|
||||
/* if restrict_access && candidate.encrypted_by_id.is_some() && candidate.encrypted_by_id != Some(application.id) {
|
||||
return Err(ServiceError::Locked)
|
||||
} */
|
||||
|
||||
let parents = Query::find_candidate_parents(db, &candidate).await?;
|
||||
let enc_details = EncryptedApplicationDetails::from((&candidate, parents));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue