-
Notifications
You must be signed in to change notification settings - Fork 858
1188 create endpoint to create client credentials #4971
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
1188 create endpoint to create client credentials #4971
Conversation
Size Change: -13 B (0%) Total Size: 6.87 MB ℹ️ View Unchanged
|
Now we have a third - outside API concept (after API's in BE & FE), maybe naming is more critical. And adding some comments what the API is about. IMO "PublicAPI" does not cut it. |
This is an immutable endpoint, so it will always return 204 regardless of whether the client_id to to delete has already been deleted or not. It will only attempt to delete a client_id that belongs to this user.
Fabulous job @akrabat, thanks! 🚀 |
export const deleteClientCredentialsCommandHandler = async ( | ||
cmd: DeleteClientCredentialsCommand | ||
) => { | ||
await deleteClientCredentials({ | ||
...cmd, | ||
}) | ||
} |
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 using async/await syntax here but you're not doing anything with the result of the deleteClientCredentials
function call, so you might as well just return the Promise straight to the caller. That's the only thing I think might be unnecessary. Everything else is 🥇
It's also just a comment, feel free to ignore it. The compiler is going to optimize this away anyways.
export const deleteClientCredentialsCommandHandler = async ( | |
cmd: DeleteClientCredentialsCommand | |
) => { | |
await deleteClientCredentials({ | |
...cmd, | |
}) | |
} | |
export const deleteClientCredentialsCommandHandler = ( | |
cmd: DeleteClientCredentialsCommand | |
) => { | |
return deleteClientCredentials({ | |
...cmd, | |
}) | |
} |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues: Did you find this useful? React with a 👍 or 👎 |
Creating endpoints to handle API client credentials creation.