예제 #1
0
파일: views.py 프로젝트: Komly/ApiServer
def category_get():
    category_id = request.args.get("category_id")
    if category_id == None or category_id == "":
        return jsonify({"error": "invalid 'category_id' key"})
    post = db.printColumn("game", category_id)
    return jsonify(db.printColumn("category", post["category"]))
예제 #2
0
파일: views.py 프로젝트: Komly/ApiServer
def get_user():
    user_id = request.args.get("user_id")
    if user_id == None or user_id == "":
        return jsonify({"error": "invalid 'user_id' key"})
    return jsonify(db.printColumn("id", user_id)[1])
예제 #3
0
파일: views.py 프로젝트: Komly/ApiServer
def game_getCategory():
    post_id = request.args.get("post_id")
    if post_id == None or post_id == "":
        return jsonify({"error": "invalid 'post_id' key"})
    post = db.printColumn("game", post_id)
    return jsonify(db.printColumn("category", post["category"]))
예제 #4
0
파일: views.py 프로젝트: Komly/ApiServer
def game_getAuthor():
    post_id = request.args.get("post_id")
    if post_id == None or post_id == "":
        return jsonify({"error": "invalid 'post_id' key"})
    post = db.printColumn("game", post_id)
    return jsonify(db.printColumn("id", post["author"])[1])
예제 #5
0
파일: views.py 프로젝트: Komly/ApiServer
def game_getpost():
    post_id = request.args.get("post_id")
    if post_id == None or post_id == "":
        return jsonify({"error": "invalid 'post_id' key"})
    return jsonify(db.printColumn("game", post_id))