bug fixed

This commit is contained in:
richard-loafle 2020-04-03 11:25:55 +09:00
parent 46cf9cd253
commit 6b6ebc29d4
4 changed files with 25 additions and 7 deletions

8
package-lock.json generated
View File

@ -2373,13 +2373,13 @@
"dev": true
},
"@ucap/ng-store-authentication": {
"version": "file:pack/ucap-ng-store-authentication-0.0.4.tgz",
"integrity": "sha512-auUqI5uS1VblhrcPSaHragi6mZ2E6KCJE+SjW05QSe+pNg2afmuCheQNC8bTGkaU0iDbLjgEwmPuhBfLczihRg==",
"dev": true
"version": "file:pack/ucap-ng-store-authentication-0.0.5.tgz",
"integrity": "sha512-ee4f9YqzCpmBu5YG9wnQXVtplkQwnG6IJaPHhwt8tXayW90PVq1Yxtn3SOOxNp/xCubTuSfJPo/kwcOF67bKug=="
},
"@ucap/ng-store-chat": {
"version": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
"integrity": "sha512-rSZirwFUMv9zXllqBWpdSUbUuRz9j1O8BVIfselp9sZHdKl7Xcx9irqNnHHkF2bJpxeWzugGrgG02tdt/xrIuQ=="
"integrity": "sha512-rSZirwFUMv9zXllqBWpdSUbUuRz9j1O8BVIfselp9sZHdKl7Xcx9irqNnHHkF2bJpxeWzugGrgG02tdt/xrIuQ==",
"dev": true
},
"@ucap/ng-store-group": {
"version": "file:pack/ucap-ng-store-group-0.0.5.tgz",

View File

@ -165,7 +165,7 @@
"@ucap/ng-protocol-status": "file:pack/ucap-ng-protocol-status-0.0.1.tgz",
"@ucap/ng-protocol-sync": "file:pack/ucap-ng-protocol-sync-0.0.1.tgz",
"@ucap/ng-protocol-umg": "file:pack/ucap-ng-protocol-umg-0.0.1.tgz",
"@ucap/ng-store-authentication": "file:pack/ucap-ng-store-authentication-0.0.4.tgz",
"@ucap/ng-store-authentication": "file:pack/ucap-ng-store-authentication-0.0.5.tgz",
"@ucap/ng-store-chat": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
"@ucap/ng-store-group": "file:pack/ucap-ng-store-group-0.0.5.tgz",
"@ucap/ng-store-organization": "file:pack/ucap-ng-store-organization-0.0.3.tgz",

View File

@ -1,6 +1,6 @@
{
"name": "@ucap/ng-store-authentication",
"version": "0.0.4",
"version": "0.0.5",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},

View File

@ -5,11 +5,14 @@ import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { RegViewResponse } from '@ucap/protocol-option';
import { AuthResponse } from '@ucap/protocol-query';
import { QueryProtocolService } from '@ucap/ng-protocol-query';
import { OptionProtocolService } from '@ucap/ng-protocol-option';
import * as LoginActions from '../login/actions';
import {
auth,
authSuccess,
@ -18,10 +21,18 @@ import {
regViewSuccess,
regViewFailure
} from './actions';
import { RegViewResponse } from '@ucap/protocol-option';
@Injectable()
export class Effects {
postLoginSuccessForAuth$ = createEffect(() => {
return this.actions$.pipe(
ofType(LoginActions.loginSuccess),
map(action =>
auth({ req: { deviceType: action.loginSession.deviceType } })
)
);
});
auth$ = createEffect(() =>
this.actions$.pipe(
ofType(auth),
@ -39,6 +50,13 @@ export class Effects {
)
);
postLoginSuccessForRegView$ = createEffect(() => {
return this.actions$.pipe(
ofType(LoginActions.loginSuccess),
map(action => regView({ req: {} }))
);
});
regView$ = createEffect(() =>
this.actions$.pipe(
ofType(regView),