1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-03 08:36:41 +07:00

login mechanism

This commit is contained in:
muerwre 2019-04-04 16:36:50 +07:00
parent 6168841f78
commit 9528e7f699
27 changed files with 528 additions and 96 deletions
src/redux/user

View file

@ -1,3 +1,24 @@
export const USER_ACTIONS = {
SOME_ACTION: 'SOME_ACTION',
SEND_LOGIN_REQUEST: 'SEND_LOGIN_REQUEST',
SET_LOGIN_ERROR: 'SET_LOGIN_ERROR',
SET_USER: 'SET_USER',
};
export const USER_ERRORS = {
INVALID_CREDENTIALS: 'Неверное имя пользователя или пароль. Очень жаль.',
EMPTY_CREDENTIALS: 'Давайте введем логин и пароль. Это обязательно.'
};
export const USER_STATUSES = {
404: USER_ERRORS.INVALID_CREDENTIALS,
};
export interface IApiUser {
id: number,
username: string,
email: string,
role: string,
activated: boolean,
createdAt: string,
updatedAt: string,
}