예제 #1
0
def list_projects_json():
    object = quorum.get_object(alias = True, find = True)
    projects = models.Project.find(map = True, **object)
    return flask.Response(
        quorum.dumps_mongo(projects),
        mimetype = "application/json"
    )
예제 #2
0
def list_builds_json(name):
    object = quorum.get_object(alias = True, find = True)
    builds = models.Build.find(map = True, sort = [("id", -1)], project = name, **object)
    return flask.Response(
        quorum.dumps_mongo(builds),
        mimetype = "application/json"
    )
예제 #3
0
def list_builds_json(name):
    object = quorum.get_object(alias=True, find=True)
    builds = models.Build.find(map=True,
                               sort=[("id", -1)],
                               project=name,
                               **object)
    return flask.Response(quorum.dumps_mongo(builds),
                          mimetype="application/json")
예제 #4
0
def list_projects_json():
    object = quorum.get_object(alias=True, find=True)
    projects = models.Project.find(map=True, **object)
    return flask.Response(quorum.dumps_mongo(projects),
                          mimetype="application/json")