diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-23 19:02:53 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-24 15:21:32 -0700 |
commit | 7ee9e001bc908aa6a934751bdef5081977d034db (patch) | |
tree | 0c27b9ca069896d840e502882a318f14a2d41bb6 /rust/src/api_server.rs | |
parent | 4f7db09a5367170c2b06d6067e840c841e15eed6 (diff) | |
download | fatcat-7ee9e001bc908aa6a934751bdef5081977d034db.tar.gz fatcat-7ee9e001bc908aa6a934751bdef5081977d034db.zip |
add state param generation
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r-- | rust/src/api_server.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs index 3b052a6c..18a3ff32 100644 --- a/rust/src/api_server.rs +++ b/rust/src/api_server.rs @@ -96,7 +96,7 @@ impl Server { issn: rev.issn, publisher: rev.publisher, name: rev.name, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -126,7 +126,7 @@ impl Server { issn: rev.issn, publisher: rev.publisher, name: rev.name, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -153,7 +153,7 @@ impl Server { let entity = CreatorEntity { name: rev.name, orcid: rev.orcid, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -181,7 +181,7 @@ impl Server { let entity = CreatorEntity { name: rev.name, orcid: rev.orcid, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -209,7 +209,7 @@ impl Server { sha1: rev.sha1, size: rev.size.map(|v| v as isize), url: rev.url, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -238,7 +238,7 @@ impl Server { sha1: rev.sha1, size: rev.size.map(|v| v as isize), url: rev.url, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -264,7 +264,7 @@ impl Server { let entity = WorkEntity { work_type: rev.work_type, - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -298,7 +298,7 @@ impl Server { issue: rev.issue, container_id: None, // TODO work_id: rev.work_ident_id.to_string(), - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), @@ -333,7 +333,7 @@ impl Server { issue: rev.issue, container_id: None, // TODO work_id: rev.work_ident_id.to_string(), - state: None, // TODO: + state: Some(ident.state().unwrap().shortname()), ident: Some(ident.id.to_string()), revision: ident.rev_id.map(|v| v as isize), redirect: ident.redirect_id.map(|u| u.to_string()), |