add youtube_id to progress api key

This commit is contained in:
simon 2022-02-24 18:55:52 +07:00
parent c4d6bb35a3
commit 6078d8d276
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -123,7 +123,7 @@ class VideoProgressView(ApiBaseView):
"""set progress position in redis""" """set progress position in redis"""
position = request.data.get("position", 0) position = request.data.get("position", 0)
key = f"{request.user.id}:progress:{video_id}" key = f"{request.user.id}:progress:{video_id}"
message = {"position": position} message = {"position": position, "youtube_id": video_id}
RedisArchivist().set_message(key, message, expire=False) RedisArchivist().set_message(key, message, expire=False)
self.response = request.data self.response = request.data