-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create application now returns the key value in a struct with the ID #156
Conversation
Added UpdateApplication function to allow updating of application name and description |
return body.Data.ID, err | ||
} | ||
|
||
func (s *Service) createApplicationResponseBody(req CreateApplicationRequest) (*connection.APIResponseBodyData[Application], error) { | ||
return connection.Post[Application](s.connection, "/account/v1/applications", &req) | ||
func (s *Service) updateApplicationResponseBody(req CreateApplicationRequest) (*connection.APIResponseBodyData[Application], error) { |
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.
You're accepting req CreateApplicationRequest
for update here
body, err := s.createApplicationResponseBody(req) | ||
|
||
response := CreateApplicationResponse{ |
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.
Rather than create a new response here, you can just return body.Data
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.
LGTM
Create application wasn't previously returning the key for the API key created, needed for terraform provider