-
Notifications
You must be signed in to change notification settings - Fork 3
[FIL-758] Allow to close ane reopen application #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fplus-http-server/src/main.rs
Outdated
.service(router::application::allocation_failed), | ||
.service(router::application::allocation_failed) | ||
.service(router::application::decline) | ||
.service(router::application::reopen_decline_application), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.service(router::application::reopen_decline_application), | |
.service(router::application::reopen_declined_application), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to all reopen_decline_application
functions
@@ -272,6 +272,7 @@ pub enum AppState { | |||
StartSignDatacap, | |||
Granted, | |||
TotalDatacapReached, | |||
DeclineApplication, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeclineApplication, | |
Declined, |
Decline
is a verb, we want an adjective here.
No need to add Application
in variant name, when this entire type already is called AppState
, so it's obvious it's about an application
@@ -14,6 +14,7 @@ impl AppState { | |||
AppState::StartSignDatacap => "start sign datacap", | |||
AppState::Granted => "granted", | |||
AppState::TotalDatacapReached => "total datacap reached", | |||
AppState::DeclineApplication => "decline application", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppState::DeclineApplication => "decline application", | |
AppState::DeclineApplication => "declined", |
pub fn close_application(self) -> Self { | ||
LifeCycle { | ||
state: AppState::DeclineApplication, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declined
specifically means that someone reviewed the application and rejected it on some grounds. Closing application is a more generic term, that could also apply in cases like client withdrawing the application or reaching the total requested datacap.
In fact, close_application
is called when total datacap is reached - setting the state to Declined
in such case is very confusing. It should be a separate state (or even just leave it as Granted, just mark as inactive?)
3eeb8ad
to
c9076c8
Compare
No description provided.