1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29:21 +00:00

Remove fallbacks

This commit is contained in:
Pierre HUBERT 2021-03-02 17:51:37 +01:00
parent aea3cd5807
commit f7fbea34ea

View File

@ -78,8 +78,7 @@ impl HttpRequestHandler {
/// Check API client tokens /// Check API client tokens
pub fn check_client_token(&mut self) -> RequestResult { pub fn check_client_token(&mut self) -> RequestResult {
// TODO : remove fallback let client_name = self.post_string("client")?;
let client_name = self.post_string_with_fallback("client", "serviceName")?;
let client = self.ok_or_bad_request( let client = self.ok_or_bad_request(
api_helper::get_client(&client_name), api_helper::get_client(&client_name),
@ -112,8 +111,7 @@ impl HttpRequestHandler {
/// Check login token /// Check login token
pub fn check_user_token(&mut self) -> Res { pub fn check_user_token(&mut self) -> Res {
// TODO : remove fallback let token = self.post_string("token")?;
let token = self.post_string_with_fallback("token", "userToken1")?;
// Find user // Find user
match account_helper::find_user_by_login_token(&token, self.api_client()) { match account_helper::find_user_by_login_token(&token, self.api_client()) {