summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/api.json2
-rw-r--r--application.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/api/api.json b/api/api.json
index 22b934e..bc1d465 100644
--- a/api/api.json
+++ b/api/api.json
@@ -111,7 +111,7 @@
"parameters": [
{
"name": "identifier",
- "in": "header",
+ "in": "formData",
"description": "SMILES identifier",
"required": true,
"type": "string"
diff --git a/application.rb b/application.rb
index 7ccaf05..0ffc633 100644
--- a/application.rb
+++ b/application.rb
@@ -49,10 +49,10 @@ end
post "/model/:id/?" do
- @identifier = params[:identifier]
+ identifier = params[:identifier]
begin
# get compound from SMILES
- compound = Compound.from_smiles @identifier
+ compound = Compound.from_smiles identifier
rescue
@error_report = "Attention, '#{params[:identifier]}' is not a valid SMILES string."
return @error_report