Skip to content

Commit

Permalink
fix: set userId optional
Browse files Browse the repository at this point in the history
  • Loading branch information
kyo504 committed Apr 24, 2024
1 parent 2228e93 commit 5e44f59
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Proguard Rule을 [공식 문서](https://developers.kakao.com/docs/latest/ko/and
| | iOS | Android | type | Description |
| ------------------------ | :-: | :-----: | :--------: | :------------: |
| `userId` ||| `number` | 회원 번호 |
| `userId` ||| `number?` | 회원 번호 |
| `serviceTerms` ||| `KakaoServiceTerms[]?`| 조회한 서비스 약관 목록 |

##### 조회한 서비스 약관 목록 (KakaoServiceTerms)
Expand Down
4 changes: 3 additions & 1 deletion ios/RNKakaoLogins/RNKakaoLogins.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ class RNKakaoLogins: NSObject {

var result: [String: Any] = [:]

result["userId"] = userServiceTerms.id
if let useId = userServiceTerms?.id {
result["userId"] = useId
}

if let serviceTerms = userServiceTerms?.serviceTerms {
result["serviceTerms"] = serviceTerms.map {
Expand Down
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ export declare type KakaoServiceTerms = {
};

export declare type KakaoUserServiceTerms = {
userId: number;
userId?: number;
serviceTerms?: KakaoServiceTerms[];
};

0 comments on commit 5e44f59

Please sign in to comment.