-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replace strings with constant values #39
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
Hi @seedspirit, Can you replace strings in invitation endpoints to constant value? |
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
@jemlog I realized I missed the invitation api. Made commit to reflect it |
LGTM! |
// this.token = response.getAccessToken(); | ||
// return response; | ||
// } | ||
public String authenticate(LoginRequest request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make a token class instead of returing string? it's for maintanence
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
Signed-off-by: BoGyum Kim | 김보겸 <[email protected]>
private final LitmusHttpClient httpClient; | ||
private final LitmusGraphQLClient graphQLClient; | ||
|
||
public LitmusClient(String host, String token) { | ||
public LitmusClient(String host, LitmusAuthToken token) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public LitmusClient(String host, LitmusAuthToken token) { | |
public LitmusClient(String host, String token) { |
Can you get token as string and make like below?
this.token = new ListAuthToken(token);
// } | ||
public LitmusAuthToken authenticate(LoginRequest request) | ||
throws IOException, LitmusApiException { | ||
LoginResponse response = httpClient.post(LOGIN, request, LoginResponse.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code actually working?
Replaced all strings to constant values. String constants values are located in io/litmuschaos/constants directory