def update_counter(room_id):
data = request.get_json()
if data and 'message_id' in data:
try:
RoomMember.where('user_id', g.user['id']).where('room_id', room_id).update(last_read_message=data['message_id'])
except Exception:
return jsonify({'message':'Bad Request'}), 400
return jsonify({}), 200
# Socket events
评论列表
文章目录