Skip to content

Commit

Permalink
Remove console.log from external api result
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejkang committed Aug 27, 2021
1 parent 8217970 commit 01af258
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,13 @@ export class Efine {

try {
const responseHtml = new JSDOM(response.data);
console.log(responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td'));
const resultElementCount = responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td').childElementCount;
if (resultElementCount === 1) {
// TODO: Message Check
return false;
}
const licenseIsValid = responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td > b:nth-child(1) > font').textContent === '전산 자료와 일치 합니다.';
const serialNumberMatched = responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td > b:nth-child(2) > font').textContent === '식별번호가 일치합니다.';
console.log(serialNumberMatched);
console.log(licenseIsValid);
console.log({
a: responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td > b:nth-child(1) > font').textContent,
b: responseHtml.window.document.querySelector('#licen-truth > tbody > tr:nth-child(1) > td > b:nth-child(2) > font').textContent,
});
return serialNumberMatched && licenseIsValid;
} catch (e) {
throw new InternalApiRequestError(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ export class SafeDriving {
const responseHtml = new JSDOM(response.data);
const licenseIsValid = responseHtml.window.document.querySelector('.contents > .ul_list > li:nth-child(2)').innerHTML === '도로교통공단 전산 자료와 일치합니다.';
const serialNumberMatched = responseHtml.window.document.querySelector('.contents > .ul_list > li:nth-child(1)').innerHTML === '암호일련번호가 일치합니다.';
console.log(serialNumberMatched);
console.log(licenseIsValid);
console.log({
a: responseHtml.window.document.querySelector('.contents > .ul_list > li:nth-child(2)').innerHTML,
b: responseHtml.window.document.querySelector('.contents > .ul_list > li:nth-child(1)').innerHTML,
});
return serialNumberMatched && licenseIsValid;
} catch (e) {
throw new InternalApiRequestError(e);
Expand Down

0 comments on commit 01af258

Please sign in to comment.