PI 로그인 시 파라미터 처리 수정.

This commit is contained in:
leejinho 2020-01-29 14:14:47 +09:00
parent a79eee3aff
commit 9bca5178b7

View File

@ -1,8 +1,8 @@
import { Injectable, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpRequest, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { map, filter } from 'rxjs/operators';
import {
Login2Request,
@ -45,15 +45,22 @@ export class PiService {
}
public login2(req: Login2Request): Observable<Login2Response> {
return this.httpClient
.post<any>(
this.urls.login2,
{},
{
params: encodeLogin2(req)
const httpReq = new HttpRequest(
'POST',
this.urls.login2,
encodeLogin2(req),
{ reportProgress: true }
);
return this.httpClient.request(httpReq).pipe(
filter(event => {
if (event instanceof HttpResponse) {
return true;
}
)
.pipe(map(res => decodeLogin2(res)));
return false;
}),
map(res => decodeLogin2((res as HttpResponse<any>).body))
);
}
public userTermsAction(