- 로그인 요청 후 응답을 AuthData 로 저장 로직 구현 - Access/Refresh 토큰 구현 중
This commit is contained in:
@@ -20,22 +20,51 @@ export class AccountNetwork extends BaseNetwork {
|
||||
async checkDuplication(data: CheckDuplicationRequest) {
|
||||
const { type, value } = data;
|
||||
|
||||
return await this.instance.get<CheckDuplicationResponse>(`${this.baseUrl}/check-duplication?type=${type}&value=${value}`);
|
||||
return await this.get<CheckDuplicationResponse>(
|
||||
`${this.baseUrl}/check-duplication?type=${type}&value=${value}`
|
||||
, {
|
||||
authPass: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async sendVerificationCode(data: SendVerificationCodeRequest) {
|
||||
return await this.instance.post<SendVerificationCodeResponse>(this.baseUrl + "/send-verification-code", data);
|
||||
return await this.post<SendVerificationCodeResponse>(
|
||||
this.baseUrl + "/send-verification-code"
|
||||
, data
|
||||
, {
|
||||
authPass: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async verifyCode(data: VerifyCodeRequest) {
|
||||
return await this.instance.post<VerifyCodeResponse>(this.baseUrl + "/verify-code", data);
|
||||
return await this.post<VerifyCodeResponse>(
|
||||
this.baseUrl + "/verify-code"
|
||||
, data
|
||||
, {
|
||||
authPass: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async signup(data: SignupRequest) {
|
||||
return await this.instance.post<SignupResponse>(this.baseUrl + "/signup", data);
|
||||
return await this.post<SignupResponse>(
|
||||
this.baseUrl + "/signup"
|
||||
, data
|
||||
, {
|
||||
authPass: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async login(data: LoginRequest) {
|
||||
return await this.instance.post<LoginResponse>(this.baseUrl + "/login", data);
|
||||
return await this.post<LoginResponse>(
|
||||
this.baseUrl + "/login"
|
||||
, data
|
||||
, {
|
||||
authPass: true
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user