Skip to content

Commit

Permalink
๐Ÿ› ํ† ํฐ ํ—ค๋” ์‚ฝ์ž… ์ฝ”๋“œ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrevile committed May 11, 2022
1 parent 01492c1 commit d199610
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apis/base.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export default class BaseAPI {

this.instance.interceptors.request.use((config: CustomAxiosRequestConfig) => {
if (config.isRequiredLogin) {
this.handleAuthenticationInterceptor;
// config.headers[
// 'Authorization'
// ] = `Bearer "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NTEyMjkwODguMDQ3MjY3LCJleHAiOjE2NTE4MzM4ODguMDQ3MjY3LCJzb2NpYWxfaWQiOiIxMDc1MTg4NDkwMzk1ODQ2MTI2ODYifQ.JqVEYVlTvLB_8YYZBuWEe6fYO75xTZtA1PmMYOUAH_o"`;
config = this.handleAuthenticationInterceptor(config);
}

return config;
Expand Down Expand Up @@ -62,7 +59,7 @@ export default class BaseAPI {
return {
...config,
headers: {
Authorization: `Bearer ${this.getJwtToken()}`,
Authorization: `Bearer "${this.getJwtToken()}"`,
},
};
}
Expand Down
23 changes: 23 additions & 0 deletions apis/teams.api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { TeamTypes } from 'types/team';
import BaseAPI from './base.api';

import type { CustomAxiosRequestConfig } from './type';

class TeamsAPI extends BaseAPI {
//https://apibora.shop/api/team/
checkTeamProfile(params: unknown) {
return this.get<TeamTypes>(`/${params}`);
}

// editUser(params: unknown, body: UserEditForm, config: CustomAxiosRequestConfig) {
// return this.put(`/${params}`, body, config);
// }
// kakaoOauth(body, config?: CustomAxiosRequestConfig) {
// return this.post<PostOauthBody, PostOauthResponse>('kakao', body, { ...config });
// }
// googleOauth(body, config?: CustomAxiosRequestConfig) {
// return this.post<PostOauthBody, PostOauthResponse>('google', body, { ...config });
// }
}

export default new TeamsAPI('team');

0 comments on commit d199610

Please sign in to comment.