bugfix
authorroot <root@brendanfh.com>
Wed, 9 Mar 2022 15:23:38 +0000 (15:23 +0000)
committerroot <root@brendanfh.com>
Wed, 9 Mar 2022 15:23:38 +0000 (15:23 +0000)
serve.py

index 4a8dc43d21f973f879c2ed053143705cdd72399a..c4a89d45ed7b41e32093495b6697a3bf23e1e417 100644 (file)
--- a/serve.py
+++ b/serve.py
@@ -27,7 +27,7 @@ def list_examples():
     example_folder = os.path.join(app.config['ONYX_SOURCE_FOLDER'], 'examples')
     filenames = [f for f in os.listdir(example_folder) if os.path.isfile(os.path.join(example_folder, f))]
     filenames.sort()
-    filenames = list(map(lambda x: x.rstrip(".onyx"), filenames))
+    filenames = list(map(lambda x: x[:-5], filenames))
     return json.dumps(filenames)
 
 @app.route("/example")