Move symbol static to /symbols

This commit is contained in:
Julien Duponchelle committed 2016-06-28 18:17:48 +02:00
1 parent c5fa699b9e
commit 5b4e668eb5
8 files changed
+67 -106

No files matched your search

@@ -36,3 +36,17 @@ class SymbolHandler:
controller = Controller.instance()
response.json(controller.symbols.list())
@Route.get(
r"/symbols/{symbol_id:.+}/raw",
description="Get the symbol file",
status_codes={
200: "Symbol returned"
})
def raw(request, response):
controller = Controller.instance()
try:
yield from response.file(controller.symbols.get_path(request.match_info["symbol_id"]))
except KeyError:
response.set_status(404)