File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -737,11 +737,7 @@ async def stats(user: User = Depends(get_current_superuser)):
737
737
async def viewer ():
738
738
"""Serve simple HTML page to view the API /static/viewer.html
739
739
Set various no-cache tag we might update it often"""
740
- mod_root = os .path .dirname (os .path .abspath (__file__ ))
741
- # truncate the last part of the path to get the root of the module
742
- # We need to install templates UNDER api package
743
- mod_root = os .path .dirname (mod_root )
744
- viewer_path = os .path .join (mod_root , 'templates' , 'viewer.html' )
740
+ viewer_path = os .path .join ('templates' , 'viewer.html' )
745
741
with open (viewer_path , 'r' , encoding = 'utf-8' ) as file :
746
742
# set header to text/html and no-cache stuff
747
743
hdr = {
You can’t perform that action at this time.
0 commit comments