Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kyo504 committed Apr 22, 2024
1 parent 750d4e9 commit e95a5e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ const NativeKakaoLogins: KakaoLoginModuleInterface = {
},
serviceTerms() {
return RNKakaoLogins.serviceTerms();

}
},
};

export const login = NativeKakaoLogins.login;
Expand Down
9 changes: 9 additions & 0 deletions src/index.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ const WebKakaoLogins: KakaoLoginModuleInterface = {
},
}).then((res) => res.json());
},
serviceTerms(tokenWeb?: string) {
return fetch('https://kapi.kakao.com/v2/user/service_terms', {
method: 'get',
headers: {
Authorization: `Bearer ${tokenWeb}`,
'Content-type': 'application/x-www-form-urlencoded;charset=utf-8',
},
}).then((res) => res.json());
},
async getAccessToken() {
throw new Error('Web does not support `getAccessToken`');
},
Expand Down
4 changes: 2 additions & 2 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ export type KakaoShippingAddress = {
export declare type KakaoAllowedServiceTerms = {
tag: string;
agreedAt: string;
}
};

export declare type KakaoAppServiceTerms = {
tag: string;
createdAt: string;
updatedAt: string;
}
};

export declare type KakaoServiceTerms = {
userId?: number;
Expand Down

0 comments on commit e95a5e6

Please sign in to comment.