mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
backend: login and logout
This commit is contained in:
parent
8bba2ff1ba
commit
032821329b
12 changed files with 166 additions and 41 deletions
|
@ -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`,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
}
|
||||
.user-bar-guest {
|
||||
// width: 168px;
|
||||
width: 158px;
|
||||
}
|
||||
|
||||
.user-button {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue