Exemplo n.º 1
0
def api_projects():
    offset = request.args.get("offset", None, type=int)
    limit = request.args.get("limit", None, type=int)
    data = users.get_user_projects(g.user,
                                   offset=offset,
                                   limit=limit,
                                   order_by="name")
    return jsonify(dict(rc=0, data=data))
Exemplo n.º 2
0
def api_get_user_projects_by_id(id):
    user = users.get(id)
    data = users.get_user_projects(user)
    return jsonify(dict(rc=0, data=data))
Exemplo n.º 3
0
def api_projects():
    offset = request.args.get("offset", None, type=int)
    limit = request.args.get("limit", None, type=int)
    data = users.get_user_projects(g.user, offset=offset, limit=limit, order_by="id", desc=True)
    return jsonify(dict(rc=0, data=data))
Exemplo n.º 4
0
def api_get_user_projects_by_id(id):
    user = users.get(id)
    data = users.get_user_projects(user)
    return jsonify(dict(rc=0, data=data))