From 9553d0a679507fec82b75ffbabed0acaaf133659 Mon Sep 17 00:00:00 2001
From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de>
Date: Mon, 27 Apr 2020 12:10:25 +0200
Subject: [PATCH] routes adapted

---
 routes/routes-account.js          | 8 ++++----
 views/DE/account/registration.pug | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/routes/routes-account.js b/routes/routes-account.js
index d43845fc..adf97214 100644
--- a/routes/routes-account.js
+++ b/routes/routes-account.js
@@ -250,7 +250,7 @@ module.exports = function (app, config, passport, i18n) {
               //req.flash('success', 'Profile updated!');
               req.flash('success', 'Ihr Benutzerprofil wurde aktualisiert!');
             }
-            res.redirect('/profile');
+            res.redirect('/account/profile');
         })
       }
     } else {
@@ -411,7 +411,7 @@ module.exports = function (app, config, passport, i18n) {
         req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.');
       }
       //res.redirect('/forgotPwd'); // deployment
-      res.redirect('/forgotPwd'); // localhost
+      res.redirect('/account/forgotPwd'); // localhost
     });
   });
 
@@ -421,7 +421,7 @@ module.exports = function (app, config, passport, i18n) {
         //req.flash('error', 'Password reset token is invalid or has expired.');
         req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.');
         //res.redirect('/forgotPwd'); // deployment
-        res.redirect('/forgotPwd'); // localhost
+        res.redirect('/account/forgotPwd'); // deployment
       }
       else {
         res.render(lang+'/account/reset');
@@ -514,7 +514,7 @@ module.exports = function (app, config, passport, i18n) {
             //req.flash('success', 'Your account has been created. Please log in.')
             req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.')
           }
-          res.redirect('/registration');
+          res.redirect('/account/registration');
         })
       });
     });
diff --git a/views/DE/account/registration.pug b/views/DE/account/registration.pug
index 3de3ed5a..32e94c87 100644
--- a/views/DE/account/registration.pug
+++ b/views/DE/account/registration.pug
@@ -45,7 +45,7 @@ html(lang="de")
                     for error, i in errors
                         div.alert.alert-danger.alert-dismissible.fade.show #{ error }
                             a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
-                form(method="POST")
+                form(method="POST" target="/account/registration")
                     h5(class="mb-3 font-weight-bold") Anmeldedaten
                     div(class='form-row')
                         div(class='form-group col-md-6')
-- 
GitLab