Skip to content

Commit

Permalink
fix: 말도안되는 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteKiwi committed Mar 12, 2023
1 parent de0d3c0 commit c4b34bd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "the-camp",
"version": "2.0.3",
"version": "2.0.4",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/client/the-camp.client.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('TheCampClient e2e', () => {
관계: '팬',
생년월일: '2001-11-26',
입영일: '2022-02-14',
전화번호: '01094862564',
전화번호: '01012341234',
});

await theCampClient.sendLetter(soldierId, {
Expand Down
4 changes: 2 additions & 2 deletions src/client/the-camp.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export class TheCampClient {
입영부대EduId,
훈련병Id,
}: SoldierIdentifier): string {
return `${입영부대}-${입영부대EduId}-${훈련병Id}`;
return `${입영부대}#${입영부대EduId}#${훈련병Id}`;
}

private parseSoldierId(soldierId: string): SoldierIdentifier {
const [입영부대, 입영부대EduId, 훈련병Id] = soldierId.split('-');
const [입영부대, 입영부대EduId, 훈련병Id] = soldierId.split('#');
// TODO: validation
return {
입영부대: 입영부대 as 입영부대,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AxiosResponse } from 'axios';

export function assertsResponse(response: AxiosResponse) {
// TODO: 개설 전 에러 처리
if (response.data.resultCd !== '0000') {
throw new Error(
response.data.resultMsg || '알 수 없는 오류가 발생하였습니다.',
Expand Down

0 comments on commit c4b34bd

Please sign in to comment.