DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 5774d421e3ce529080c6a381230080bd47b35d5c felu/static/felu.js -rw-r--r-- 279 bytes
5774d421Jonni Liljamo fix: swap AuthLogin to return the handler instead 1 year, 30 days ago
                                                                                
1
2
3
4
5
6
7
8
9
document.body.addEventListener('htmx:beforeSwap', function(evt) {
	if (evt.detail.xhr.status === 400) {
		evt.detail.shouldSwap = true;
		evt.detail.isError = false;
	} else if (evt.detail.xhr.status === 401) {
		evt.detail.shouldSwap = true;
		evt.detail.isError = false;
	}
})