mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bugfix/login-query' into 'dev'
Reset query arguments on login if ?next is not available See merge request crafty-controller/crafty-4!750
This commit is contained in:
commit
4842d5c505
@ -5,7 +5,7 @@
|
||||
### New features
|
||||
TBD
|
||||
### Bug fixes
|
||||
TBD
|
||||
- Reset query arguments on login if `?next` is not available ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/750))
|
||||
### Tweaks
|
||||
- Add link to go back to dashboard on error page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/743))
|
||||
### Lang
|
||||
|
@ -48,7 +48,10 @@ class PublicHandler(BaseHandler):
|
||||
}
|
||||
|
||||
if self.request.query:
|
||||
page_data["query"] = self.request.query_arguments.get("next")[0].decode()
|
||||
request_query = self.request.query_arguments.get("next")
|
||||
if not request_query:
|
||||
self.redirect("/login")
|
||||
page_data["query"] = request_query[0].decode()
|
||||
|
||||
# sensible defaults
|
||||
template = "public/404.html"
|
||||
|
@ -171,7 +171,6 @@
|
||||
|
||||
//Create an object from the form data entries
|
||||
let formDataObject = Object.fromEntries(formData.entries());
|
||||
console.log(formDataObject)
|
||||
let res = await fetch(`/login`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
Loading…
Reference in New Issue
Block a user