mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 09:34:04 +00:00 
			
		
		
		
	Fix error
This commit is contained in:
		@@ -112,8 +112,11 @@ impl HttpRequestHandler {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Forbidden (401)
 | 
			
		||||
    ///
 | 
			
		||||
    /// I did not the HTTP official specs when I made this choice of using Unauthorized instead
 | 
			
		||||
    /// of Forbidden. Today it would be really complicated to come back...
 | 
			
		||||
    pub fn forbidden(&mut self, message: String) -> RequestResult {
 | 
			
		||||
        self.response = Some(HttpResponse::Forbidden().json(
 | 
			
		||||
        self.response = Some(HttpResponse::Unauthorized().json(
 | 
			
		||||
            HttpError::forbidden(&message)));
 | 
			
		||||
        Err(Box::new(ExecError::new(&message)))
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user