Skip to content

Commit

Permalink
Merge pull request openjournals#1278 from openjournals/add-submitting…
Browse files Browse the repository at this point in the history
…-author-handle-to-json

Adding submitting author GitHub handle to the JSON response
  • Loading branch information
arfon committed Sep 27, 2023
2 parents 46a4137 + 05be1c5 commit 9ea4acb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/papers/show.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if @paper.published?
json.year @paper.year
json.page @paper.page
json.authors @paper.metadata_authors
json.submitting_author @paper&.submitting_author&.pretty_github_username
json.editor @paper.metadata_editor
if @paper.editor
json.editor_name @paper.editor.full_name
Expand Down
1 change: 1 addition & 0 deletions spec/controllers/papers_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
expect(parsed_response["state"]).to eq("accepted")
expect(parsed_response["software_repository"]).to eq("http://github.com/arfon/fidgit")
expect(parsed_response["editor"]).to eq("@arfon")
expect(parsed_response["submitting_author"]).to eq("@foobar")
expect(parsed_response["editor_name"]).to eq("Person McEditor")
expect(parsed_response["editor_orcid"]).to eq("0000-0000-0000-1234")
expect(parsed_response["doi"]).to eq("10.21105/joss.00000")
Expand Down

0 comments on commit 9ea4acb

Please sign in to comment.