Beispiel #1
0
def del_group(group_id):
    app.logger.info("get activity:%s,%s,%s" % (group_id, request.headers, request.args))
    app.logger.info("current_user :%s,%s" % (current_user, current_user.user_id))

    group = Group(group_id, current_user.user_id)
    ret = group.del_group()
    app.logger.info("get_activity:%s" % ret)

    return jsonify(ret)
Beispiel #2
0
def search_group():
    app.logger.info("get activity:%s,%s" % (request.headers, request.args))
    app.logger.info("current_user :%s,%s" % (current_user, current_user.user_id))

    ret = Group.group_search(current_user.user_id, group)
    #ret = group.get_one_group()
    app.logger.info("get_activity:%s" % ret)

    return jsonify(ret)
Beispiel #3
0
def create_group():
    app.logger.info("post activity:%s,%s" % (request.headers, request.json))
    app.logger.info("current_user :%s,%s" % (current_user, current_user.user_id))
    token = request.args.get("token")
    group = request.json.get("group")
    if token is None or group is None:
        app.logger.error("missing parameters:%s,%s" % (token, group))
        abort(400)

    ret = Group.post_group(current_user.user_id, group)
    app.logger.info("post activity:%s" % ret)
    return jsonify(ret)