Browse Source

Finish Home & Video page

pull/8/head
astria 4 months ago
parent
commit
0d54d7cc70
  1. 561
      backend/logs/access.log
  2. 4
      frontend/src/components/Recommendations.jsx
  3. 2
      frontend/src/components/SeeLater.jsx
  4. 6
      frontend/src/components/TopCreators.jsx
  5. 2
      frontend/src/components/TrendingVideos.jsx
  6. 23
      frontend/src/contexts/AuthContext.jsx
  7. 10
      frontend/src/pages/Home.jsx
  8. 40
      frontend/src/pages/Video.jsx

561
backend/logs/access.log

@ -8806,3 +8806,564 @@
[2025-08-24 18:34:48.277] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200 [2025-08-24 18:34:48.277] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-24 18:34:54.944] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200 [2025-08-24 18:34:54.944] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-24 18:35:28.834] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200 [2025-08-24 18:35:28.834] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 11:49:58.042] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 11:50:25.801] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 11:55:58.582] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-25 11:55:58.586] [undefined] GET(/:id/history): failed to retrieve history of user 4 because it doesn't exist with status 404
[2025-08-25 11:55:58.590] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 11:55:58.593] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 11:55:58.603] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 11:56:01.644] [undefined] GET(/:id): try to get channel with id 2
[2025-08-25 11:56:01.655] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 11:56:01.659] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-08-25 11:56:01.667] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 11:56:02.870] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 11:56:02.874] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 12:01:30.651] [undefined] POST(/): try to upload video with status undefined
[2025-08-25 12:01:30.656] [undefined] POST(/): successfully uploaded video with status 200
[2025-08-25 12:01:30.775] [undefined] POST(/thumbnail): try to add thumbnail to video 1
[2025-08-25 12:01:30.788] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-08-25 12:01:30.822] [undefined] PUT(/:id/tags): try to add tags to video 1
[2025-08-25 12:01:30.833] [undefined] PUT(/:id/tags): successfully added tags to video 1 with status 200
[2025-08-25 12:01:33.645] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:01:45.682] [undefined] GET(/:id): try to get video 1
[2025-08-25 12:01:45.685] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 12:01:45.694] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 12:01:45.713] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 12:01:45.725] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 12:01:45.795] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 12:01:45.805] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 12:01:50.581] [undefined] POST(/:id): Video added to playlist with id 4 with status 200
[2025-08-25 12:01:52.771] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:03:18.248] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:03:20.853] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:03:47.849] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:03:59.663] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 12:03:59.672] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 12:03:59.686] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 12:03:59.691] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 12:04:03.364] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:04:20.414] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 12:04:20.423] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 12:04:20.450] [undefined] GET(/:id/channel/subscribed): check if user 4 is subscribed to channel 1
[2025-08-25 12:04:20.454] [undefined] GET(/:id/channel/subscribed): user 4 is not subscribed to channel 1 with status 200
[2025-08-25 12:04:23.685] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 12:04:23.706] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 12:04:25.207] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:04:41.386] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:05:02.094] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 12:07:50.763] [undefined] GET(/:id): try to get channel with id 2
[2025-08-25 12:07:50.776] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-08-25 14:11:32.226] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:11:32.239] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:11:32.250] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:11:32.259] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:11:45.224] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:11:45.242] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:11:45.250] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:11:45.256] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:12:37.526] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:12:37.540] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:12:37.551] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:12:37.556] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:12:41.058] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 14:12:43.020] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:12:43.031] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:12:43.043] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:12:43.049] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:12:49.717] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:12:49.732] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:12:49.738] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:12:49.768] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:13:02.733] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:13:02.737] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:13:02.751] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:13:02.780] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:13:02.793] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:13:02.881] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 14:13:02.890] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 14:16:03.407] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:16:03.426] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:16:03.452] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:16:03.461] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:16:08.740] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:16:08.755] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:16:08.786] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:16:08.800] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:16:17.336] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:16:17.349] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:16:17.383] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:16:17.393] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:16:20.252] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:16:20.266] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:16:20.325] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:16:20.337] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:17:11.314] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:17:11.328] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:17:11.350] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:17:11.359] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:17:18.836] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:17:18.847] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:17:18.904] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:17:18.918] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:17:46.226] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:17:46.240] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:17:46.278] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:17:46.289] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:17:47.910] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:17:47.920] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:17:47.969] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:17:47.977] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:19:09.711] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:19:09.726] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:19:09.765] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:19:09.778] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:19:48.887] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:19:48.896] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:19:48.935] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:19:48.945] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:20:46.502] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:20:46.519] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:20:46.549] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:20:46.566] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:20:52.104] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:20:52.125] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:20:52.150] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:20:52.161] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:21:58.815] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:21:58.832] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:21:58.893] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:21:58.910] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:22:45.138] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:22:45.157] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:22:45.187] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:22:45.197] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:22:46.482] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:22:46.495] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:22:46.528] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:22:46.545] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:23:22.459] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:23:22.485] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:23:22.520] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:23:22.532] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:23:27.373] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:23:27.376] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:23:27.396] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:23:27.414] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:23:27.427] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:23:27.466] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 14:23:27.474] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 14:23:32.866] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:23:32.880] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:23:32.917] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:23:32.926] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:26:16.081] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 14:27:10.510] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-25 14:27:10.515] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 14:27:10.521] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-25 14:27:10.525] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 14:27:10.533] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:27:21.864] [undefined] GET(/:id): try to get channel with id 2
[2025-08-25 14:27:21.875] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 14:27:21.881] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-08-25 14:27:21.887] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 14:27:23.087] [undefined] GET(/:id/likes/day): try to get likes per day
[2025-08-25 14:27:23.099] [undefined] GET(/:id/likes/day): successfully retrieved likes per day with status 200
[2025-08-25 14:27:23.102] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:27:23.112] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:27:28.813] [undefined] POST(/thumbnail): try to add thumbnail to video 1
[2025-08-25 14:27:28.826] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-08-25 14:27:32.796] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 14:27:43.061] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 14:28:06.971] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:28:06.983] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:28:07.033] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:28:07.043] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:31:32.600] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:31:32.614] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:31:32.643] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:31:32.652] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:31:52.322] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:31:52.334] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:31:52.365] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:31:52.376] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:32:23.148] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:32:23.162] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:32:23.216] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:32:23.233] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:33:34.255] [undefined] POST(/): try to register a user with username: PR and email: p.rassant@axelerance.fr
[2025-08-25 14:34:17.138] [undefined] POST(/): try to register a user with username: PR and email: p.rassant@axelerance.fr
[2025-08-25 14:34:18.629] [undefined] POST(/): successfully registered with status 200
[2025-08-25 14:34:26.245] [undefined] POST(/verify-email): try to verify email for p.rassant@axelerance.fr with token 7a70f
[2025-08-25 14:34:26.262] [undefined] POST(/verify-email): successfully verified email for p.rassant@axelerance.fr with status 200
[2025-08-25 14:34:34.941] [undefined] POST(/login): try to login with username 'PR'
[2025-08-25 14:34:34.998] [undefined] POST(/login): Successfully logged in with status 200
[2025-08-25 14:34:35.208] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 5 with status 200
[2025-08-25 14:34:39.094] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 5 with status 200
[2025-08-25 14:34:42.343] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:34:42.346] [undefined] GET(/user/:id): Playlists retrieved for user with id 5 with status 200
[2025-08-25 14:34:42.367] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:34:42.390] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:34:42.406] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:34:42.449] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 14:34:42.462] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 14:34:54.112] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:54.127] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:56.565] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:56.588] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:56.871] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:56.894] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:57.179] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:57.199] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:57.486] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:57.501] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:57.607] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:57.625] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:57.800] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:57.817] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:57.969] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:57.987] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:58.120] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.141] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:58.284] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.304] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:58.447] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.464] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:58.616] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.637] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:58.774] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.795] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:58.925] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:58.940] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:59.079] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.096] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:59.248] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.266] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:59.406] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.422] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:59.556] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.574] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:34:59.717] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.732] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:34:59.870] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:34:59.885] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:35:00.049] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.071] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:35:00.224] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.238] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:35:00.383] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.399] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:35:00.561] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.580] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:35:00.728] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.743] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:35:00.881] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:35:00.897] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 14:35:01.051] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:36:14.266] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:14.289] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:15.897] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:36:15.916] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:36:16.017] [undefined] GET(/user/:id): Playlists retrieved for user with id 5 with status 200
[2025-08-25 14:36:16.166] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:36:16.176] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:36:16.294] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 14:36:16.304] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 14:36:17.807] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:17.822] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:18.386] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:18.401] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:18.795] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:18.815] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:19.205] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.225] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:19.248] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.264] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:19.380] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.401] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:19.530] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.548] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:19.684] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.702] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:19.833] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:19.850] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:19.987] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.000] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:20.136] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.158] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:20.289] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.307] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:20.454] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.474] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:20.609] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.626] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:20.759] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.773] [undefined] GET(/:id/like): likes found, removing like for video 1 with status 200
[2025-08-25 14:36:20.928] [undefined] GET(/:id/like): try to toggle like on video 1
[2025-08-25 14:36:20.943] [undefined] GET(/:id/like): no likes found adding likes for video 1 with status 200
[2025-08-25 14:36:23.296] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 2
[2025-08-25 14:36:23.312] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 14:36:25.616] [undefined] GET(/:id/channel): try to retrieve channel of user 5
[2025-08-25 14:36:25.619] [undefined] GET(/:id/channel): failed to retrieve channel of user 5 because it doesn't exist with status 404
[2025-08-25 14:36:25.634] [undefined] GET(/:id/history): try to retrieve history of user 5
[2025-08-25 14:36:25.638] [undefined] GET(/:id/history): successfully retrieved history of user 5 with status 200
[2025-08-25 14:36:25.694] [undefined] GET(/user/:id): Playlists retrieved for user with id 5 with status 200
[2025-08-25 14:37:29.596] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 14:37:30.983] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-25 14:37:30.993] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-25 14:37:31.003] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:37:31.009] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-25 14:37:54.637] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:37:54.640] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 14:37:54.661] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:37:54.690] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:37:54.704] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:37:54.768] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 14:37:54.778] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 14:38:20.313] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:38:20.332] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:38:20.375] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:38:20.387] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:38:38.939] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:38:38.950] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:38:38.999] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:38:39.011] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:39:08.001] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:39:08.020] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:39:08.098] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:39:08.111] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:39:22.000] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:39:22.015] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:39:22.046] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:39:22.057] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:40:07.692] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:40:07.713] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:40:07.749] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:40:07.763] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 14:42:09.207] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 14:42:09.222] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 14:42:13.626] [undefined] GET(/:id): try to get video 1
[2025-08-25 14:42:13.643] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 14:42:13.678] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 14:42:13.692] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:39:19.567] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:39:19.570] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 15:39:19.586] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:39:19.612] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:39:19.624] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:39:19.686] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 15:39:19.696] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 15:39:38.990] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:39:39.011] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:39:39.041] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:39:39.051] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:39:57.292] [undefined] POST(/:id): Video added to playlist with id 4 with status 200
[2025-08-25 15:41:31.783] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:41:31.794] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:41:31.854] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:41:31.872] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:41:42.221] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:41:42.234] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:41:42.290] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:41:42.309] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:42:06.926] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:42:06.939] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:42:06.974] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:42:06.987] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:42:19.666] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:42:19.678] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:42:19.736] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:42:19.745] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:42:33.318] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:42:33.335] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:42:33.390] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:42:33.410] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:44:38.232] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:44:38.247] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:44:38.291] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:44:38.309] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:45:50.155] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:45:50.166] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:45:50.202] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:45:50.212] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:03.710] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:46:03.723] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:46:03.806] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:46:03.818] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:19.158] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:46:19.172] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:46:19.252] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:46:19.265] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:28.850] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:46:28.868] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:46:28.941] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:46:28.952] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:43.073] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:46:43.094] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:46:43.129] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:46:43.141] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:51.682] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:46:51.685] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 15:46:51.702] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:46:51.729] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:46:51.741] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:46:51.807] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 15:47:23.039] [undefined] POST(/): try to post comment
[2025-08-25 15:47:23.061] [undefined] POST(/): successfully post comment with status 200
[2025-08-25 15:47:25.427] [undefined] GET(/:id): try to get video 1
[2025-08-25 15:47:25.431] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 15:47:25.443] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 15:47:25.471] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 15:47:25.485] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 15:47:25.528] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 15:47:25.535] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:21:47.859] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 16:21:47.863] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 16:21:47.872] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-25 16:21:47.876] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-25 16:21:47.884] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:21:48.737] [undefined] GET(/:id): try to get channel with id 2
[2025-08-25 16:21:48.749] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 16:21:48.753] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-08-25 16:21:48.762] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 16:21:51.344] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 16:21:51.347] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 16:22:22.598] [undefined] POST(/): try to upload video with status undefined
[2025-08-25 16:22:22.603] [undefined] POST(/): successfully uploaded video with status 200
[2025-08-25 16:22:22.827] [undefined] POST(/thumbnail): try to add thumbnail to video 2
[2025-08-25 16:22:22.831] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-08-25 16:22:22.856] [undefined] PUT(/:id/tags): try to add tags to video 2
[2025-08-25 16:22:22.867] [undefined] PUT(/:id/tags): Tag sasa already exists for video 2 with status 200
[2025-08-25 16:22:22.870] [undefined] PUT(/:id/tags): successfully added tags to video 2 with status 200
[2025-08-25 16:22:24.909] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 16:22:27.807] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:22:27.811] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:22:27.825] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:22:27.849] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:22:27.866] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:22:27.917] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:22:27.925] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:22:36.853] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:22:36.858] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:22:36.870] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:22:36.904] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:22:36.919] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:22:36.958] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:22:36.966] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:23:15.258] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:23:15.262] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:23:15.273] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:23:15.298] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:23:15.314] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:23:15.389] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:23:15.398] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:23:25.239] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:23:25.253] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:23:25.261] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:23:25.286] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:23:25.304] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:23:25.349] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:23:25.358] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:23:34.064] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:23:34.067] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:23:34.084] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:23:34.111] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:23:34.126] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:23:34.221] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:23:34.231] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:23:58.139] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:23:58.142] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:23:58.160] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:23:58.184] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:23:58.199] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:23:58.239] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:23:58.252] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:24:05.426] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:24:05.429] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:24:05.448] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:24:05.471] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:24:05.492] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:24:05.544] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:24:05.553] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:24:19.268] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:24:19.272] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:24:19.290] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:24:19.314] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:24:19.328] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:24:19.409] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:24:19.421] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:24:39.501] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:24:39.504] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:24:39.520] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:24:39.542] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:24:39.556] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:24:39.603] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:24:39.612] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:25:12.031] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:25:12.033] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:25:12.049] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:25:12.079] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:25:12.095] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:25:12.176] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:25:12.184] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:25:18.037] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:25:18.041] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:25:18.059] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:25:18.086] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:25:18.103] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:25:18.147] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:25:18.156] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:25:28.240] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 16:25:38.420] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-25 16:25:38.423] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-25 16:25:38.426] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-25 16:25:38.429] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-25 16:25:38.434] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:25:39.878] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-25 16:25:42.592] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:25:51.763] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:25:51.766] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-25 16:25:51.784] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:25:51.805] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:25:51.821] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:25:51.919] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:25:51.927] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:26:02.445] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:26:02.458] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:26:02.503] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:26:02.514] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:28:25.948] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:28:25.961] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:28:26.022] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:28:26.032] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:28:44.701] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-25 16:28:44.916] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:28:44.934] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:28:44.972] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:28:44.988] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:28:54.587] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-25 16:29:10.555] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-25 16:30:30.645] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:30:30.658] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:30:30.681] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:30:30.692] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:31:12.859] [undefined] POST(/login): try to login with username 'astria'
[2025-08-25 16:31:12.915] [undefined] POST(/login): Successfully logged in with status 200
[2025-08-25 16:31:13.146] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 16:31:19.325] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:31:19.328] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 16:31:19.342] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:31:19.428] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:31:19.443] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:31:19.476] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:31:19.484] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:31:21.685] [undefined] GET(/:id): try to get video 1
[2025-08-25 16:31:21.696] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 16:31:21.706] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 16:31:21.736] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 16:31:21.745] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 16:31:21.796] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 16:31:21.804] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 16:31:35.595] [undefined] POST(/): try to post comment
[2025-08-25 16:31:35.613] [undefined] POST(/): successfully post comment with status 200
[2025-08-25 16:31:43.544] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200

4
frontend/src/components/Recommendations.jsx

@ -4,9 +4,9 @@ export default function Recommendations({videos}) {
console.log(videos); console.log(videos);
return ( return (
<div className=""> <div className="">
<h2 className="text-3xl font-bold mb-4 text-white">Recommendations</h2> <h2 className="text-3xl font-bold mb-4 text-white">Recommandations</h2>
<div> <div>
<div className="grid grid-cols-5 gap-8 mt-2"> <div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => ( {videos && videos.map((video, index) => (
<VideoCard key={video.id || index} video={video} /> <VideoCard key={video.id || index} video={video} />
))} ))}

2
frontend/src/components/SeeLater.jsx

@ -7,7 +7,7 @@ export default function SeeLater({videos}) {
<div className="mt-10"> <div className="mt-10">
<h2 className="text-3xl font-bold mb-4 text-white">A regarder plus tard</h2> <h2 className="text-3xl font-bold mb-4 text-white">A regarder plus tard</h2>
<div> <div>
<div className="grid grid-cols-5 gap-8 mt-2"> <div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => ( {videos && videos.map((video, index) => (
<VideoCard key={video.id || index} video={video} /> <VideoCard key={video.id || index} video={video} />
))} ))}

6
frontend/src/components/TopCreators.jsx

@ -4,14 +4,14 @@ export default function TopCreators({ creators, navigate }) {
return ( return (
<div className="mt-10"> <div className="mt-10">
<h2 className="text-3xl font-bold mb-4 text-white">Top Créateurs</h2> <h2 className="text-3xl font-bold mb-4 text-white">Top Créateurs</h2>
<div className="grid grid-cols-5 gap-8 mt-8"> <div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-8">
{creators && creators.map((creator, index) => ( {creators && creators.map((creator, index) => (
<div <div
key={creator.id || index} key={creator.id || index}
className="flex flex-col items-center glassmorphism " className="flex flex-col items-center glassmorphism py-2"
onClick={() => navigate(`/channel/${creator.id}`)} onClick={() => navigate(`/channel/${creator.id}`)}
> >
<img src={creator.profilepicture} alt={creator.name} className="w-[128px] h-auto rounded-full" /> <img src={creator.profilepicture} alt={creator.name} className="w-[128px] aspect-square rounded-full" />
<h3 className="text-xl text-white font-bold mt-1">{creator.name}</h3> <h3 className="text-xl text-white font-bold mt-1">{creator.name}</h3>
<span className="text-sm text-gray-500">{creator.subscriber_count} abonné{creator.subscriber_count > 1 ? 's' : ''}</span> <span className="text-sm text-gray-500">{creator.subscriber_count} abonné{creator.subscriber_count > 1 ? 's' : ''}</span>
<p className="text-center text-gray-400"> <p className="text-center text-gray-400">

2
frontend/src/components/TrendingVideos.jsx

@ -6,7 +6,7 @@ export default function TrendingVideos({ videos }) {
return ( return (
<div className="mt-10"> <div className="mt-10">
<h2 className="text-3xl font-bold mb-4 text-white">Tendances</h2> <h2 className="text-3xl font-bold mb-4 text-white">Tendances</h2>
<div className="grid grid-cols-5 gap-8 mt-2"> <div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => ( {videos && videos.map((video, index) => (
<VideoCard video={video} key={index} /> <VideoCard video={video} key={index} />
))} ))}

23
frontend/src/contexts/AuthContext.jsx

@ -1,4 +1,4 @@
import React, { createContext, useContext, useState, useEffect, useCallback } from 'react'; import React, { createContext, useContext, useState, useEffect } from 'react';
const AuthContext = createContext(); const AuthContext = createContext();
@ -25,7 +25,7 @@ export const AuthProvider = ({ children }) => {
setLoading(false); setLoading(false);
}, []); }, []);
const login = useCallback(async (username, password) => { const login = async (username, password) => {
try { try {
const response = await fetch('/api/users/login', { const response = await fetch('/api/users/login', {
method: 'POST', method: 'POST',
@ -50,9 +50,9 @@ export const AuthProvider = ({ children }) => {
} catch (error) { } catch (error) {
throw error; throw error;
} }
}, []); };
const register = useCallback(async (email, username, password, profileImage) => { const register = async (email, username, password, profileImage) => {
try { try {
const formData = new FormData(); const formData = new FormData();
formData.append('email', email); formData.append('email', email);
@ -81,26 +81,25 @@ export const AuthProvider = ({ children }) => {
} catch (error) { } catch (error) {
throw error; throw error;
} }
}, []); };
const loginWithOAuth = useCallback((userData, token) => { const loginWithOAuth = (userData, token) => {
console.log('OAuth login called with:', userData);
// Store token and user data // Store token and user data
localStorage.setItem('token', token); localStorage.setItem('token', token);
localStorage.setItem('user', JSON.stringify(userData)); localStorage.setItem('user', JSON.stringify(userData));
setUser(userData); setUser(userData);
}, []); };
const logout = useCallback(() => { const logout = () => {
localStorage.removeItem('token'); localStorage.removeItem('token');
localStorage.removeItem('user'); localStorage.removeItem('user');
setUser(null); setUser(null);
}, []); };
const getAuthHeaders = useCallback(() => { const getAuthHeaders = () => {
const token = localStorage.getItem('token'); const token = localStorage.getItem('token');
return token ? { Authorization: `Bearer ${token}` } : {}; return token ? { Authorization: `Bearer ${token}` } : {};
}, []); };
const value = { const value = {
user, user,

10
frontend/src/pages/Home.jsx

@ -92,18 +92,22 @@ export default function Home() {
<h1 className="font-montserrat text-4xl lg:text-8xl font-black w-1200/1920 text-center text-white -translate-y-1/2"> <h1 className="font-montserrat text-4xl lg:text-8xl font-black w-1200/1920 text-center text-white -translate-y-1/2">
Regarder des vidéos comme jamais auparavant Regarder des vidéos comme jamais auparavant
</h1> </h1>
<div className="flex justify-center gap-28 -translate-y-[100px] mt-10">
<button className="bg-white text-black font-montserrat p-3 rounded-sm text-2xl font-bold">
<div className="flex justify-center gap-10 -translate-y-[100px] mt-10">
<button className="bg-white text-black font-montserrat p-3 rounded-sm text-xl lg:text-2xl font-bold">
<a href="/login"> <a href="/login">
<p>Se connecter</p> <p>Se connecter</p>
</a> </a>
</button> </button>
<button className="bg-primary p-3 rounded-sm text-white font-montserrat text-2xl font-bold cursor-pointer"> <button className="bg-primary p-3 rounded-sm text-white font-montserrat text-xl lg:text-2xl font-bold cursor-pointer">
<a href="/register"> <a href="/register">
<p>Créer un compte</p> <p>Créer un compte</p>
</a> </a>
</button> </button>
</div> </div>
</> </>
)} )}
</div> </div>

40
frontend/src/pages/Video.jsx

@ -35,6 +35,7 @@ export default function Video() {
const [playlists, setPlaylists] = useState([]); const [playlists, setPlaylists] = useState([]);
const [isAddToPlaylistOpen, setIsAddToPlaylistOpen] = useState(false); const [isAddToPlaylistOpen, setIsAddToPlaylistOpen] = useState(false);
const [currentPlaylist, setCurrentPlaylist] = useState(null); const [currentPlaylist, setCurrentPlaylist] = useState(null);
const [isCommentVisible, setIsCommentVisible] = useState(window.innerWidth >= 1024); // Show comments by default on large screens
const fetchVideo = useCallback(async () => { const fetchVideo = useCallback(async () => {
// Fetch video data and similar videos based on the video ID from the URL // Fetch video data and similar videos based on the video ID from the URL
@ -307,11 +308,11 @@ export default function Video() {
<div className="min-w-screen min-h-screen bg-linear-to-br from-left-gradient to-right-gradient"> <div className="min-w-screen min-h-screen bg-linear-to-br from-left-gradient to-right-gradient">
<Navbar isSearchPage={false} alerts={alerts} onCloseAlert={onCloseAlert} /> <Navbar isSearchPage={false} alerts={alerts} onCloseAlert={onCloseAlert} />
<main className="px-36 w-full flex justify-between pt-[118px]"> <main className="px-5 lg:px-36 w-full lg:flex justify-between pt-[48px] lg:pt-[118px]">
{video ? ( {video ? (
<> <>
{/* Video player section */} {/* Video player section */}
<div className="w-1280/1920"> <div className="lg:w-1280/1920">
<div <div
className="relative w-full aspect-video mx-auto rounded-lg overflow-hidden" className="relative w-full aspect-video mx-auto rounded-lg overflow-hidden"
@ -326,6 +327,8 @@ export default function Video() {
onTimeUpdate={handleTimeUpdate} onTimeUpdate={handleTimeUpdate}
onLoadedMetadata={handleLoadedMetadata} onLoadedMetadata={handleLoadedMetadata}
onEnded={passToNextVideo} onEnded={passToNextVideo}
className="w-full h-full object-cover"
controls={window.innerWidth < 1024} // Show native controls on small screens
> >
<source src={`${video.file}`} type="video/mp4" /> <source src={`${video.file}`} type="video/mp4" />
Your browser does not support the video tag. Your browser does not support the video tag.
@ -333,7 +336,7 @@ export default function Video() {
{/* Video controls */} {/* Video controls */}
<div <div
className={`absolute bottom-4 left-4 right-4 glassmorphism-rounded-md p-4 flex items-center transition-opacity duration-300 ${ className={`absolute bottom-4 left-4 right-4 glassmorphism-rounded-md p-4 hidden lg:flex items-center transition-opacity duration-300 ${
showControls ? 'opacity-100' : 'opacity-0' showControls ? 'opacity-100' : 'opacity-0'
}`} }`}
ref={controllerRef} ref={controllerRef}
@ -367,7 +370,8 @@ export default function Video() {
<h1 className="mt-3 font-montserrat font-bold text-2xl text-white">{video.title}</h1> <h1 className="mt-3 font-montserrat font-bold text-2xl text-white">{video.title}</h1>
{/* Channel and like */} {/* Channel and like */}
<div className="flex items-center mt-4"> <div className="lg:flex items-center mt-4">
<div className="flex">
<img <img
src={video.creator?.profile_picture || "https://placehold.co/48"} src={video.creator?.profile_picture || "https://placehold.co/48"}
alt={video.creator?.name || "Creator"} alt={video.creator?.name || "Creator"}
@ -380,15 +384,20 @@ export default function Video() {
<button className="ml-14 bg-primary text-white font-montserrat font-bold px-4 py-2 rounded-md cursor-pointer" onClick={handleSubscribe} > <button className="ml-14 bg-primary text-white font-montserrat font-bold px-4 py-2 rounded-md cursor-pointer" onClick={handleSubscribe} >
s'abonner s'abonner
</button> </button>
<button className="ml-4 cursor-pointer" onClick={handleLike}> </div>
<div className="flex items-center lg:ml-auto mt-4 lg:mt-0">
<button className="lg:ml-4 cursor-pointer" onClick={handleLike}>
<svg width="32" height="32" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="32" height="32" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 31.5H7.5V12H6C5.20435 12 4.44129 12.3161 3.87868 12.8787C3.31607 13.4413 3 14.2044 3 15V28.5C3 29.2956 3.31607 30.0587 3.87868 30.6213C4.44129 31.1839 5.20435 31.5 6 31.5ZM30 12H19.5L21.183 6.948C21.3332 6.49712 21.3741 6.01702 21.3024 5.54723C21.2306 5.07745 21.0483 4.63142 20.7705 4.24589C20.4926 3.86036 20.1271 3.54636 19.7041 3.32975C19.2811 3.11314 18.8127 3.00012 18.3375 3H18L10.5 11.157V31.5H27L32.868 18.606L33 18V15C33 14.2044 32.6839 13.4413 32.1213 12.8787C31.5587 12.3161 30.7956 12 30 12Z" fill="white"/> <path d="M6 31.5H7.5V12H6C5.20435 12 4.44129 12.3161 3.87868 12.8787C3.31607 13.4413 3 14.2044 3 15V28.5C3 29.2956 3.31607 30.0587 3.87868 30.6213C4.44129 31.1839 5.20435 31.5 6 31.5ZM30 12H19.5L21.183 6.948C21.3332 6.49712 21.3741 6.01702 21.3024 5.54723C21.2306 5.07745 21.0483 4.63142 20.7705 4.24589C20.4926 3.86036 20.1271 3.54636 19.7041 3.32975C19.2811 3.11314 18.8127 3.00012 18.3375 3H18L10.5 11.157V31.5H27L32.868 18.606L33 18V15C33 14.2044 32.6839 13.4413 32.1213 12.8787C31.5587 12.3161 30.7956 12 30 12Z" fill="white"/>
</svg> </svg>
</button> </button>
<p className="font-montserrat text-white ml-2" >{video.likes}</p> <p className="font-montserrat text-white ml-2" >{video.likes}</p>
{
isAuthenticated && (
<button className="relative ml-14"> <button className="relative ml-14">
<div className="bg-primary cursor-pointer px-4 py-2 rounded-md flex items-center gap-4" onClick={() => setIsAddToPlaylistOpen(!isAddToPlaylistOpen)} > <div className="bg-primary cursor-pointer px-4 py-2 rounded-md flex items-center gap-4" onClick={() => { setIsAddToPlaylistOpen(!isAddToPlaylistOpen) }} >
<p className="text-white font-montserrat font-bold" >playlist</p> <p className="text-white font-montserrat font-bold" >playlist</p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" className="fill-white"><path d="M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" className="fill-white"><path d="M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"></path></svg>
</div> </div>
@ -415,6 +424,9 @@ export default function Video() {
} }
</button> </button>
)
}
</div>
</div> </div>
{/* Video details */} {/* Video details */}
@ -436,7 +448,12 @@ export default function Video() {
{/* Comments section */} {/* Comments section */}
<div> <div>
<h2 className="font-montserrat text-white text-2xl mt-8">Commentaires</h2> <div className="flex justify-between items-center mt-8 mb-2">
<h2 className="font-montserrat text-white text-2xl">Commentaires</h2>
<button className="text-white lg:hidden" onClick={() => setIsCommentVisible(!isCommentVisible)} >
Voir {isCommentVisible ? "moins" : "plus"}
</button>
</div>
<textarea <textarea
className="glassmorphism h-[100px] w-full font-inter text-white placeholder:text-[#9f9f9f] focus:outline-none py-4 px-6" className="glassmorphism h-[100px] w-full font-inter text-white placeholder:text-[#9f9f9f] focus:outline-none py-4 px-6"
placeholder="Ajouter un commentaire..." placeholder="Ajouter un commentaire..."
@ -449,6 +466,8 @@ export default function Video() {
</button> </button>
{/* Comments list */} {/* Comments list */}
{
isCommentVisible && (
<div className="mt-4"> <div className="mt-4">
{video.comments && video.comments.length > 0 ? ( {video.comments && video.comments.length > 0 ? (
video.comments.map((comment, index) => ( video.comments.map((comment, index) => (
@ -458,6 +477,8 @@ export default function Video() {
<p className="text-gray-400">Aucun commentaire pour le moment. Soyez le premier à en publier !</p> <p className="text-gray-400">Aucun commentaire pour le moment. Soyez le premier à en publier !</p>
)} )}
</div> </div>
)
}
</div> </div>
@ -469,15 +490,16 @@ export default function Video() {
{ {
!isPlaylist ? ( !isPlaylist ? (
<div className="flex flex-col items-center gap-2"> <div className="flex flex-col items-center gap-2">
<h2 className="font-montserrat w-full lg:w-9/10 mt-8 text-white text-2xl">Recommandations</h2>
{similarVideos.map((video, index) => ( {similarVideos.map((video, index) => (
<div className="w-9/10" key={index}> <div className="w-full lg:w-9/10" key={index}>
<VideoCard video={video} /> <VideoCard video={video} />
</div> </div>
))} ))}
</div> </div>
) : ( ) : (
<div className="flex flex-col items-center gap-2"> <div className="flex flex-col items-center gap-2">
<div className="glassmorphism w-9/10 py-4 px-2" > <div className="glassmorphism w-full lg:w-9/10 py-4 px-2" >
<h2 className="font-montserrat text-white text-2xl">{currentPlaylist?.name}</h2> <h2 className="font-montserrat text-white text-2xl">{currentPlaylist?.name}</h2>
{ {
currentPlaylist?.videos && currentPlaylist.videos.length > 0 ? ( currentPlaylist?.videos && currentPlaylist.videos.length > 0 ? (

Loading…
Cancel
Save