You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by nc...@apache.org on 2021/09/17 16:33:57 UTC

[incubator-sdap-nexus] branch master updated: apidocs path hotfix (#136)

This is an automated email from the ASF dual-hosted git repository.

nchung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/master by this push:
     new 034bf31  apidocs path hotfix (#136)
034bf31 is described below

commit 034bf3164f05cf0649dbbd15c9ab93182dd48b34
Author: joshgarde <jo...@gmail.com>
AuthorDate: Fri Sep 17 09:33:52 2021 -0700

    apidocs path hotfix (#136)
    
    Co-authored-by: Josh Garde <jg...@jpl.nasa.gov>
---
 analysis/webservice/webapp.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/analysis/webservice/webapp.py b/analysis/webservice/webapp.py
index 786ce12..abb09b8 100644
--- a/analysis/webservice/webapp.py
+++ b/analysis/webservice/webapp.py
@@ -18,6 +18,7 @@ import importlib
 import logging
 import sys
 import os
+from pathlib import Path
 from functools import partial
 
 import pkg_resources
@@ -142,8 +143,10 @@ if __name__ == "__main__":
 
     handlers.append(
         (r'/apidocs', tornado.web.RedirectHandler, {"url": "/apidocs/"}))
+
+    apidocs_path = Path(__file__).parent.joinpath('apidocs').resolve()
     handlers.append(
-        (r'/apidocs/(.*)', tornado.web.StaticFileHandler, {'path': 'webservice/apidocs', "default_filename": "index.html"}))
+        (r'/apidocs/(.*)', tornado.web.StaticFileHandler, {'path': str(apidocs_path), "default_filename": "index.html"}))
 
     if staticEnabled:
         handlers.append(