Git Lab CI for docker build enabled! You can enable it using .gitlab-ci.yml in your project. Check file template at https://gitlab.bio.di.uminho.pt/snippets/5

Commit 1eb1d14e authored by Davide Lagoa's avatar Davide Lagoa

individual reaction page added

parent 265113d9
......@@ -5,6 +5,7 @@ import os
import socket
import shutil
import logging
import re
CONFIGURATIONS = read_conf_file('/configs/docker_config.conf')
......@@ -32,6 +33,7 @@ last_submission_ID = 0
print('SERVER WORKING')
@app.route("/")
def index():
logging.info('Welcome page rendering...')
......@@ -72,6 +74,20 @@ def submitMerlinPlugin(taxonomyId):
return run(files, taxonomyId, True)
@app.route("/reaction/<reactionId>", methods=["GET"])
def getReactionInfo(reactionId):
pattern = re.compile("^TR\d{6}")
patternFound = bool(pattern.match(reactionId))
if patternFound:
return jsonify({"Result": "Success",
"Purpose": "Future page for transyt reaction " + reactionId}), 200
else:
logging.info('Bad request to get reaction. Request done: ' + reactionId)
return jsonify({"Result": "Bad request, page does not exist!"}), 400
def run(files, taxonomyId, isRest):
logging.debug('New submission in progress...')
......@@ -260,6 +276,7 @@ def verifyInput(userInput):
return validTaxID
logging.info('Server running!')
if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment