server.py 文件源码

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

项目:Chorus 作者: DonaldBough 项目源码 文件源码
def post(self):
        try:
            # Parse the arguments
            parser = reqparse.RequestParser()
            parser.add_argument('userid', type=str, help='ID of User that is sending vote')
            parser.add_argument('eventid', type=str, help='ID of event user is in')
            args = parser.parse_args()

            _userID = args['userid']
            _eventID = args['eventid']

            db = Database()
            songs = db.getQueue(_eventID, _userID)

            return json.dumps({'songs': songs})

        except Exception as e:
            return {'error': str(e)}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号