TidGi-Desktop/src/state/dialog-auth/actions.js
2020-03-20 00:34:43 -05:00

18 lines
499 B
JavaScript

import { UPDATE_AUTH_FORM } from '../../constants/actions';
import { requestValidateAuthIdentity } from '../../senders';
export const updateForm = (changes) => (dispatch) => dispatch({
type: UPDATE_AUTH_FORM,
changes,
});
export const login = () => (dispatch, getState) => {
const { form } = getState().dialogAuth;
const { username, password } = form;
const { remote } = window.require('electron');
requestValidateAuthIdentity(remote.getCurrentWindow().id, username, password);
};