Implemented incorrect username/password message. Resolves #7.
authorAdam Dullage <redacted>
Tue, 28 Jun 2022 19:39:51 +0000 (20:39 +0100)
committerAdam Dullage <redacted>
Tue, 28 Jun 2022 19:39:51 +0000 (20:39 +0100)
flatnotes/src/components/App.js

index 96347fbf628fabd9303eb894860b71bd187deac9..57b969c603ffe75dec08c411ac075931813a7a40 100644 (file)
@@ -95,6 +95,14 @@ export default {
           let redirectPath = helpers.getSearchParam(constants.params.redirect);
           parent.navigate(redirectPath || "/");
         })
+        .catch(function(error) {
+          if ([400, 422].includes(error.response.status)) {
+            parent.$bvToast.toast("Incorrect Username or Password ✘", {
+              variant: "danger",
+              noCloseButton: true,
+            });
+          }
+        })
         .finally(function() {
           parent.usernameInput = null;
           parent.passwordInput = null;
git clone https://git.99rst.org/PROJECT