summaryrefslogtreecommitdiffstats
path: root/rust/src/api_server.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-23 23:40:30 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-24 15:21:32 -0700
commit953a7e99079a45ba803652eee19227b96d0d4488 (patch)
treeb0c48426c19ddaa5c3c2d7d18dfd856c46273086 /rust/src/api_server.rs
parent1b4892a29889ffd8013a720aa7ba986ae0809485 (diff)
downloadfatcat-953a7e99079a45ba803652eee19227b96d0d4488.tar.gz
fatcat-953a7e99079a45ba803652eee19227b96d0d4488.zip
fix release insert SQL
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r--rust/src/api_server.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 9bb7f155..3016b92b 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -632,13 +632,13 @@ impl Api for Server {
};
let edit: ReleaseEditRow = diesel::sql_query(
- "WITH rev AS ( INSERT INTO container_rev (title, release_type, doi, volume, pages, issue, work_ident_id)
+ "WITH rev AS ( INSERT INTO release_rev (title, release_type, doi, volume, pages, issue, work_ident_id)
VALUES ($1, $2, $3, $4, $5, $6, $7)
RETURNING id ),
- ident AS ( INSERT INTO container_ident (rev_id)
+ ident AS ( INSERT INTO release_ident (rev_id)
VALUES ((SELECT rev.id FROM rev))
RETURNING id )
- INSERT INTO container_edit (editgroup_id, ident_id, rev_id) VALUES
+ INSERT INTO release_edit (editgroup_id, ident_id, rev_id) VALUES
($8, (SELECT ident.id FROM ident), (SELECT rev.id FROM rev))
RETURNING *",
).bind::<diesel::sql_types::Text, _>(body.title)