mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-17 21:41:20 +00:00
fix: create candidate error
This commit is contained in:
parent
2d9b755e5a
commit
3bef8d9534
2 changed files with 9 additions and 3 deletions
|
|
@ -51,7 +51,7 @@ impl<'r> FromRequest<'r> for AdminAuth {
|
|||
match session {
|
||||
Ok(model) => Outcome::Success(AdminAuth(model, private_key.to_string())),
|
||||
Err(e) => Outcome::Failure(
|
||||
(Status::from_code(e.code()).unwrap_or(Status::InternalServerError), None)
|
||||
(Status::from_code(e.code()).unwrap_or(Status::Unauthorized), None)
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,16 @@ impl ApplicationService {
|
|||
personal_id_number: String,
|
||||
) -> Result<(candidate::Model, parent::Model), ServiceError> {
|
||||
Ok(
|
||||
tokio::try_join!(
|
||||
/* tokio::try_join!( // TODO: try_join! is not working
|
||||
CandidateService::create(db, application_id, plain_text_password, personal_id_number),
|
||||
ParentService::create(db, application_id)
|
||||
)?
|
||||
)? */
|
||||
|
||||
|
||||
(
|
||||
CandidateService::create(db, application_id, plain_text_password, personal_id_number).await?,
|
||||
ParentService::create(db, application_id).await?
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue