views.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:CactusAPI 作者: CactusDev 项目源码 文件源码
def user_quotes(channel):
    """
    If you GET this endpoint, go to /api/v1/channel/<channel>/quote
    with <channel> replaced for the channel you want to get quotes for
    """
    model = "quote"

    if channel.isdigit():
        fields = {"channelId": int(channel), "deleted": False}
    else:
        fields = {"owner": channel.lower(), "deleted": False}

    packet, code = generate_response(
        model,
        request.path,
        request.method,
        request.values,
        fields=fields
    )

    return make_response(jsonify(packet), code)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号