Пример #1
0
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")
Пример #2
0
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")
Пример #3
0
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")
Пример #4
0
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")
Пример #5
0
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")
Пример #6
0
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")