Can get possible couple states through API

This commit is contained in:
2023-08-07 17:01:56 +02:00
parent 29c503a6b0
commit ff8e3cce9d
3 changed files with 37 additions and 2 deletions

View File

@ -1,5 +1,6 @@
use crate::app_config::{AppConfig, OIDCProvider};
use crate::constants::StaticConstraints;
use crate::models::{CoupleState, CoupleStateDesc};
use crate::utils::countries_utils;
use crate::utils::countries_utils::CountryCode;
use actix_web::{HttpResponse, Responder};
@ -15,6 +16,7 @@ struct ServerConfig<'a> {
mail: &'static str,
oidc_providers: Vec<OIDCProvider<'a>>,
countries: Vec<CountryCode>,
couples_states: Vec<CoupleStateDesc>,
}
impl Default for ServerConfig<'_> {
@ -24,6 +26,7 @@ impl Default for ServerConfig<'_> {
constraints: StaticConstraints::default(),
oidc_providers: AppConfig::get().openid_providers(),
countries: countries_utils::get_list(),
couples_states: CoupleState::states_list(),
}
}
}