|author||Yorhel <email@example.com>||2019-12-10 10:32:37 +0100|
|committer||Yorhel <firstname.lastname@example.org>||2019-12-10 10:32:39 +0100|
Elm: Add Redirect response + fix redirect to last post on reply
Fixes https://vndb.org/t2520/14#334 - I originally had some trouble to do this because `load` doesn't actually reload the page if you're just changing the hash. The `reload` following it handles that now. The Redirect response is just cleanup, there's several places that could benefit form it.
Diffstat (limited to 'elm/Lib')
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/Lib/Api.elm b/elm/Lib/Api.elm
index 1e028904..b4dfb78f 100644
@@ -26,11 +26,11 @@ showResponse res =
HTTPError (Http.BadBody r) -> "Invalid response from the server, please report a bug (debug info: " ++ r ++")."
HTTPError (Http.BadUrl _) -> unexp
Success -> unexp
+ Redirect _ -> unexp
CSRF -> "Invalid CSRF token, please refresh the page and try again."
Invalid -> "Invalid form data, please report a bug."
Unauth -> "You do not have the permission to perform this action."
Unchanged -> "No changes"
- Changed _ _ -> unexp
Content _ -> unexp
BadLogin -> "Invalid username or password."
LoginThrottle -> "Action throttled, too many failed login attempts."