backend: login and logout

This commit is contained in:
muerwre 2018-11-30 10:50:37 +07:00
parent 8bba2ff1ba
commit 032821329b
12 changed files with 166 additions and 41 deletions

View file

@ -3,7 +3,7 @@ export const TEST = 'http://localhost:3000';
export const API = {
COMPOSE: `${SERVER}/engine/composerOrchid.php`,
GET_GUEST: `${TEST}/auth/guest`,
GET_GUEST: `${TEST}/auth`,
CHECK_TOKEN: `${TEST}/auth`,
GET_MAP: `${SERVER}/engine/authOrchid.php`,
POST_MAP: `${SERVER}/engine/authOrchid.php?action=store`,

View file

@ -117,8 +117,9 @@ function* authChechSaga() {
if (id && token) {
const user = yield call(checkUserToken, { id, token });
if (user && user.success) {
if (user) {
yield put(setUser(user));
return yield call(mapInitSaga);
}
}

View file

@ -7,6 +7,7 @@
}
.user-bar-guest {
// width: 168px;
width: 158px;
}
.user-button {