1
0
mirror of https://github.com/gsi-upm/senpy synced 2026-01-20 06:38:16 +00:00

Filter conversion plugins

Closes #12

* Shows only analysis plugins by default on /api/plugins
* Adds a plugin_type parameter to get other types of plugins
* default_plugin chosen from analysis plugins
This commit is contained in:
J. Fernando Sánchez
2017-03-06 11:27:49 +01:00
parent 0394bcd69c
commit 1a582c0843
4 changed files with 50 additions and 22 deletions

View File

@@ -121,7 +121,9 @@ def api():
@basic_api
def plugins():
sp = current_app.senpy
dic = Plugins(plugins=list(sp.plugins.values()))
ptype = request.params.get('plugin_type')
plugins = sp.filter_plugins(plugin_type=ptype)
dic = Plugins(plugins=list(plugins.values()))
return dic