-
Notifications
You must be signed in to change notification settings - Fork 687
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
api: expose journalist first and last name if set #4459
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4459 +/- ##
========================================
Coverage 83.21% 83.21%
========================================
Files 45 45
Lines 3069 3069
Branches 332 332
========================================
Hits 2554 2554
Misses 430 430
Partials 85 85
Continue to review full report at Codecov.
|
👍 Tested these endpoints as well as the reply endpoints, to check the doc changes. All looks good. |
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.
This is good, thank you 🌈 🌈 🌈
we expose them on: - the user endpoint - the reply JSON objects (since this is the place where we want to use them in the client)
cb8b644
to
ca446c5
Compare
hey @kushaldas this needs a restamp (I did make a change above so your review was dismissed) |
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.
Approved.
Status
Ready for review
Description of Changes
This is a followup from #4425. In this PR we expose the journalist first name and last name added in #4425 on:
Testing
Reading the diff and tests should be sufficient, but here are steps to test an endpoint that has the first name / last name added with curl for convenience:
Get a token
curl -X POST -H "Content-Type: application/json" --data '{"username":"journalist","passphrase":"correct horse battery staple profanity oil chewy","one_time_code":"ADDYOURSHERE"}' 127.0.0.1:8081/api/v1/token
Get
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token ADDYOURSHERE" 127.0.0.1:8081/api/v1/user
Deployment
No special considerations
Checklist
If you made changes to the server application code:
make lint
) and tests (make -C securedrop test
) pass in the development container (I'm relying on CI, only ran the API tests)If you made non-trivial code changes:
If you made changes to documentation:
make docs-lint
) passed locally