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 <[email protected]>
AuthorDate: Fri Sep 17 09:33:52 2021 -0700
apidocs path hotfix (#136)
Co-authored-by: Josh Garde <[email protected]>
---
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(