diff options
| -rw-r--r-- | __main__.py | 4 | ||||
| -rw-r--r-- | helpers.py | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/__main__.py b/__main__.py index 95b78ab..44f9892 100644 --- a/__main__.py +++ b/__main__.py @@ -18,10 +18,6 @@ from .routes import * import time sys.tracebacklimit = 1000 -@route("/api") -def get_root(): - notAllowed() - if __name__ == "__main__": def loadEntries(): for handler in [CC(), CCAN()]: @@ -53,8 +53,9 @@ def calculateHashForFile(file, hashobj : object = None) -> object: return hashobj -def notAllowed(): - raise HTTPResponse(f"Cannot {request.method} {request.path}") +@route("<path:path>") +def default(path): + raise HTTPResponse(f"Cannot {request.method} {path}", 405) @route("<path:path>", method="OPTIONS") def options(path): |
