웹링크 > 이메일, 결재 뱃지 정보 수정.

This commit is contained in:
leejinho 2019-12-24 16:48:27 +09:00
parent 41c1a907a8
commit dc27cd1cd5
2 changed files with 8 additions and 3 deletions

View File

@ -38,7 +38,12 @@ export const decodePaymentCount: APIDecoder<PaymentCountResponse> = (
const viewentriesDom: HTMLCollection = dom.getElementsByTagName(
'viewentries'
);
if (!!viewentriesDom && viewentriesDom.length > 0) {
if (
!!viewentriesDom &&
viewentriesDom.length > 0 &&
!!viewentriesDom[0].getAttribute('toplevelentries') &&
viewentriesDom[0].getAttribute('toplevelentries').length > 0
) {
count =
viewentriesDom[0].getAttribute('toplevelentries').trim().length > 0
? Number(viewentriesDom[0].getAttribute('toplevelentries').trim())

View File

@ -20,13 +20,13 @@ export class DaesangApiService {
public retrieveMailCount(url: string): Observable<MailCountResponse> {
return this.httpClient
.post<any>(url, {}, {})
.get(url, { responseType: 'text' })
.pipe(map(res => decodeMailCount(res)));
}
public retrievePaymentCount(url: string): Observable<PaymentCountResponse> {
return this.httpClient
.post<any>(url, {}, {})
.get(url, { responseType: 'text' })
.pipe(map(res => decodePaymentCount(res)));
}
}