Compare commits

..

2 commits

Author SHA1 Message Date
ItsDrike 939ae84a10
Better success msg 2024-04-18 22:22:34 +02:00
ItsDrike cfafabc3d8
Fix success detection 2024-04-18 22:22:16 +02:00

View file

@ -85,6 +85,11 @@ impl From<Response> for EditError {
if status.is_redirection() { if status.is_redirection() {
let location = headers.get("Location").unwrap().to_str().unwrap(); let location = headers.get("Location").unwrap().to_str().unwrap();
if location == "/" {
// This is supposed to be handled from delete_paste function,
// This is an error enum, we can't represent success
panic!("response is successfult");
}
return Self::UnexpectedRedirect(location.to_string()); return Self::UnexpectedRedirect(location.to_string());
} }