closer to user login/register

This commit is contained in:
Brian Sakal
2021-04-06 18:10:53 -04:00
parent d7e0d4ffd4
commit cfb21fd2dc
6 changed files with 88 additions and 15 deletions
+7 -1
View File
@@ -50,7 +50,12 @@ const login_request_handler = function(state, dispatch, e){
else{
dispatch('login-failed');
}
});
})
.catch(e=>{ dispatch('login-failed'); });
};
const logout_request_handler = function(state, dispatch, e){
dispatch('logout-requested');
api.post('/logout', {session_id: state.login.session_id});
};
const bin_name_editing_toggle_button_handler = function(state, dispatch){
dispatch('update-bin-name-editing', !state.is_editing_bin_name);
@@ -70,6 +75,7 @@ export {new_note_handler,
username_change_handler,
password_change_handler,
login_request_handler,
logout_request_handler,
bin_name_editing_toggle_button_handler,
bin_name_change_handler,
bin_name_commit_handler