summaryrefslogtreecommitdiff
path: root/elm/Lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-10 10:32:37 +0100
committerYorhel <git@yorhel.nl>2019-12-10 10:32:39 +0100
commit5075f0ef4573fa95252c1a91b62239cc9b6347bb (patch)
treefcc6be6d5cad66dc1af217a4f6b3fe733df60945 /elm/Lib
parentfa7b9e6a14a1597516738a75b6dfb9d326be7d48 (diff)
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')
-rw-r--r--elm/Lib/Api.elm2
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/Lib/Api.elm b/elm/Lib/Api.elm
index 1e028904..b4dfb78f 100644
--- a/elm/Lib/Api.elm
+++ b/elm/Lib/Api.elm
@@ -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."