Update to extend login info cookies to 365 days to reduce reductant page refresh

This commit is contained in:
Cheng-Han, Wu 2016-06-26 23:37:59 +08:00
parent 65b91e0b66
commit 83d8142045

View file

@ -28,11 +28,11 @@ function resetCheckAuth() {
function setLoginState(bool, id) { function setLoginState(bool, id) {
Cookies.set('loginstate', bool, { Cookies.set('loginstate', bool, {
expires: 14 expires: 365
}); });
if (id) { if (id) {
Cookies.set('userid', id, { Cookies.set('userid', id, {
expires: 14 expires: 365
}); });
} else { } else {
Cookies.remove('userid'); Cookies.remove('userid');