-
Notifications
You must be signed in to change notification settings - Fork 529
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
Make owner optional in experiment POST endpoint. #2133
Conversation
0f0f02b
to
b0bb472
Compare
Deploy preview for docs ready! ✅ Preview Built with commit 170ccd3. |
b0bb472
to
3fea430
Compare
@@ -47,20 +47,26 @@ export const postExperiment = createApiRequestHandler(postExperimentValidator)( | |||
); | |||
} | |||
|
|||
const user = await getUserByEmail(owner); | |||
const ownerId = await (async () => { | |||
if (!onwerEmail) return req.context.userId; |
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.
The original feature request specification is:
if the auth was done via a personal access token, and an owner property wasn't provided, we should default to the owner of the personal access token.
Is that the right interpretation?
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.
Yes, that's correct
3fea430
to
f194e5d
Compare
Your preview environment pr-2133-bttf has been deployed. Preview environment endpoints are available at: |
when available and owner is not provided.
f194e5d
to
170ccd3
Compare
Features and Changes
This PR addresses the changes described in #1928. It makes
owner
body argument optional and uses the request'suserId
for its value when available and noowner
has been spericified.