summaryrefslogtreecommitdiffstats
path: root/rust/src/api_server.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-08-20 01:18:10 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-08-20 01:18:10 -0700
commitb8ca8ebdae304dcc2a694e5dfbc9070003f0df8a (patch)
treea54dfa8362341907ca38bd3e1bdd671b4e55097d /rust/src/api_server.rs
parent657c1e7d4d6f07762bc1f6a7b24e9512e0089987 (diff)
downloadfatcat-b8ca8ebdae304dcc2a694e5dfbc9070003f0df8a.tar.gz
fatcat-b8ca8ebdae304dcc2a694e5dfbc9070003f0df8a.zip
use index_val, not index, in SQL schema
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r--rust/src/api_server.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 66e6359a..b0dff173 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -198,12 +198,12 @@ fn release_row2entity(
let refs: Vec<ReleaseRef> = release_ref::table
.filter(release_ref::release_rev.eq(rev.id))
- .order(release_ref::index.asc())
+ .order(release_ref::index_val.asc())
.get_results(conn)
.expect("fetch release refs")
.into_iter()
.map(|r: ReleaseRefRow| ReleaseRef {
- index: r.index,
+ index: r.index_val,
key: r.key,
extra: r.extra_json,
container_title: r.container_title,
@@ -216,12 +216,12 @@ fn release_row2entity(
let contribs: Vec<ReleaseContrib> = release_contrib::table
.filter(release_contrib::release_rev.eq(rev.id))
- .order((release_contrib::role.asc(), release_contrib::index.asc()))
+ .order((release_contrib::role.asc(), release_contrib::index_val.asc()))
.get_results(conn)
.expect("fetch release refs")
.into_iter()
.map(|c: ReleaseContribRow| ReleaseContrib {
- index: c.index,
+ index: c.index_val,
raw_name: c.raw_name,
role: c.role,
extra: c.extra_json,
@@ -741,7 +741,7 @@ impl Server {
target_release_ident_id: r.target_release_id
.clone()
.map(|v| fcid2uuid(&v).expect("valid fatcat identifier")),
- index: r.index,
+ index_val: r.index,
key: r.key.clone(),
container_title: r.container_title.clone(),
year: r.year,
@@ -773,7 +773,7 @@ impl Server {
.clone()
.map(|v| fcid2uuid(&v).expect("valid fatcat identifier")),
raw_name: c.raw_name.clone(),
- index: c.index,
+ index_val: c.index,
role: c.role.clone(),
extra_json: c.extra.clone(),
})