def delete_workspace_api(id): try: delete_workspace(id) except DeletingSelectedWorkspaceError: ui_response = '{"error":"Is not allowed to delete the workspace while it is selected."}' return Response(json.dumps(ui_response), mimetype="application/json") in_doc = list_workspace() out_doc = JSONEncoder().encode(in_doc) return Response(json.dumps(out_doc), mimetype="application/json")
def delete_workspace_api(id): delete_workspace(id) in_doc = list_workspace() out_doc = JSONEncoder().encode(in_doc) return Response(json.dumps(out_doc), mimetype="application/json")
def add_workspace_api(name): add_workspace(name) in_doc = list_workspace() out_doc = JSONEncoder().encode(in_doc) return Response(json.dumps(out_doc), mimetype="application/json")
def selected_workspace_api(id): set_workspace_selected(id) in_doc = list_workspace() out_doc = JSONEncoder().encode(in_doc) return Response(json.dumps(out_doc), mimetype="application/json")