[Draft] Implement Early deletion by Submitter #37 #38
4 changed files with 7 additions and 7 deletions
apply workaround to fix migration problem
commit
d8b45c9d0f
|
|
@ -20,8 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- startup errors are more descriptive
|
- startup errors are more descriptive
|
||||||
- the confirmation link now works after confirmation so that submissions can be deleted early by the submitter
|
- the confirmation link now works after confirmation so that submissions can be deleted early by the submitter
|
||||||
- this changes the on-disk format slightly as the token now has a different scope and was moved accordingly
|
- this changes the on-disk format slightly as the token now has a different scope and was moved accordingly
|
||||||
- automatic migration of the on-disk format currently does not work, this appears to be due to a serde bug,
|
|
||||||
as an effect all tokens of job offers in the old format will be forgotten
|
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,9 @@ pub(crate) struct Link {
|
||||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Hash)]
|
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Hash)]
|
||||||
#[serde(tag = "type", deny_unknown_fields)]
|
#[serde(tag = "type", deny_unknown_fields)]
|
||||||
pub enum ConfirmationStatus {
|
pub enum ConfirmationStatus {
|
||||||
AwaitingConfirmation,
|
AwaitingConfirmation {
|
||||||
|
// work around for https://github.com/serde-rs/serde/issues/2294
|
||||||
|
},
|
||||||
Confirmed,
|
Confirmed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,7 +150,7 @@ impl From<V1JobOfferStatus> for JobOfferStatus {
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let (confirmation_status, token) = match confirmation_status {
|
let (confirmation_status, token) = match confirmation_status {
|
||||||
V1ConfirmationStatus::AwaitingConfirmation { token } => {
|
V1ConfirmationStatus::AwaitingConfirmation { token } => {
|
||||||
(ConfirmationStatus::AwaitingConfirmation, Some(token))
|
(ConfirmationStatus::AwaitingConfirmation {}, Some(token))
|
||||||
}
|
}
|
||||||
V1ConfirmationStatus::Confirmed => (ConfirmationStatus::Confirmed, None),
|
V1ConfirmationStatus::Confirmed => (ConfirmationStatus::Confirmed, None),
|
||||||
};
|
};
|
||||||
|
|
@ -604,7 +606,7 @@ impl JobOffer<PathBuf> {
|
||||||
status: JobOfferStatus {
|
status: JobOfferStatus {
|
||||||
submitter_token: Some("Token".to_string()),
|
submitter_token: Some("Token".to_string()),
|
||||||
review_status: ReviewStatus::AwaitingReview,
|
review_status: ReviewStatus::AwaitingReview,
|
||||||
confirmation_status: ConfirmationStatus::AwaitingConfirmation,
|
confirmation_status: ConfirmationStatus::AwaitingConfirmation {},
|
||||||
},
|
},
|
||||||
attachments: vec![Attachment {
|
attachments: vec![Attachment {
|
||||||
title: "Attachment".to_string(),
|
title: "Attachment".to_string(),
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ impl JobOfferActions {
|
||||||
|
|
||||||
let confirmation_url = match &offer.status {
|
let confirmation_url = match &offer.status {
|
||||||
JobOfferStatus {
|
JobOfferStatus {
|
||||||
confirmation_status: ConfirmationStatus::AwaitingConfirmation,
|
confirmation_status: ConfirmationStatus::AwaitingConfirmation {},
|
||||||
submitter_token: Some(token),
|
submitter_token: Some(token),
|
||||||
review_status: _,
|
review_status: _,
|
||||||
} => Some(req.url_for(JOBOFFER_CONFIRM_ROUTE, [id, token])?),
|
} => Some(req.url_for(JOBOFFER_CONFIRM_ROUTE, [id, token])?),
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ pub(crate) async fn create_job_offer<'data, 'config>(
|
||||||
let confirmation_status = if skip_confirmation {
|
let confirmation_status = if skip_confirmation {
|
||||||
ConfirmationStatus::Confirmed
|
ConfirmationStatus::Confirmed
|
||||||
} else {
|
} else {
|
||||||
ConfirmationStatus::AwaitingConfirmation
|
ConfirmationStatus::AwaitingConfirmation {}
|
||||||
};
|
};
|
||||||
|
|
||||||
let job_offer = JobOffer {
|
let job_offer = JobOffer {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue