Browse Source

STAGING

pull/10/head
astria 4 months ago
parent
commit
492529f846
  1. 18
      backend/app/controllers/channel.controller.js
  2. 10
      backend/app/controllers/comment.controller.js
  3. 6
      backend/app/controllers/oauth.controller.js
  4. 42
      backend/app/controllers/playlist.controller.js
  5. 82
      backend/app/controllers/recommendation.controller.js
  6. 4
      backend/app/controllers/search.controller.js
  7. 115
      backend/app/controllers/user.controller.js
  8. 34
      backend/app/controllers/video.controller.js
  9. 94
      backend/app/middlewares/channel.middleware.js
  10. 36
      backend/app/middlewares/comment.middleware.js
  11. 70
      backend/app/middlewares/playlist.middleware.js
  12. 74
      backend/app/middlewares/user.middleware.js
  13. 132
      backend/app/middlewares/video.middleware.js
  14. 35
      backend/app/utils/database.js
  15. 943
      backend/logs/access.log
  16. 21
      backend/tools.js
  17. 63
      frontend/src/pages/Subscription.jsx
  18. 48
      frontend/src/services/user.service.js

18
backend/app/controllers/channel.controller.js

@ -18,7 +18,7 @@ export async function create(req, res) {
logger.action("try to create new channel with owner " + channel.owner + " and name " + channel.name);
logger.write("Successfully created new channel with name " + channel.name, 200);
client.end();
client.release();
res.status(200).json(channel);
}
@ -87,7 +87,7 @@ export async function getById(req, res) {
result.rows[0].videos = videoReturn;
logger.write("Successfully get channel with id " + id, 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
}
@ -123,7 +123,7 @@ export async function getAll(req, res) {
})
logger.write("Successfully get all channels", 200);
client.end();
client.release();
res.status(200).json(result);
}
@ -147,7 +147,7 @@ export async function update(req, res) {
const nameResult = await client.query(nameQuery, [channel.name]);
if (nameResult.rows.length > 0) {
logger.write("failed to update channel because name already taken", 400);
client.end();
client.release();
res.status(400).json({error: 'Name already used'});
return
}
@ -156,7 +156,7 @@ export async function update(req, res) {
const updateQuery = `UPDATE channels SET name = $1, description = $2 WHERE id = $3`;
await client.query(updateQuery, [channel.name, channel.description, id]);
logger.write("Successfully updated channel", 200);
client.end();
client.release();
res.status(200).json(channel);
}
@ -169,7 +169,7 @@ export async function del(req, res) {
const query = `DELETE FROM channels WHERE id = $1`;
await client.query(query, [id]);
logger.write("Successfully deleted channel", 200);
client.end();
client.release();
res.status(200).json({message: 'Successfully deleted'});
}
@ -194,7 +194,7 @@ export async function toggleSubscription(req, res) {
const remainingSubscriptions = countResult.rows[0].count;
logger.write("Successfully unsubscribed from channel", 200);
client.end();
client.release();
res.status(200).json({message: 'Unsubscribed successfully', subscriptions: remainingSubscriptions});
} else {
// Subscribe
@ -207,7 +207,7 @@ export async function toggleSubscription(req, res) {
const totalSubscriptions = countResult.rows[0].count;
logger.write("Successfully subscribed to channel", 200);
client.end();
client.release();
res.status(200).json({message: 'Subscribed successfully', subscriptions: totalSubscriptions});
}
}
@ -233,7 +233,7 @@ export async function getStats(req, res) {
const client = await getClient();
const result = await client.query(request, [id]);
logger.write("Successfully get stats", 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
} catch (error) {
console.log(error);

10
backend/app/controllers/comment.controller.js

@ -39,7 +39,7 @@ export async function upload(req, res) {
createdAt: createdAt
}
client.end();
client.release();
res.status(200).json(responseComment);
}
@ -52,7 +52,7 @@ export async function getByVideo(req, res) {
const query = `SELECT * FROM comments WHERE video = $1`;
const result = await client.query(query, [videoId]);
logger.write("successfully get comment", 200);
client.end()
client.release()
res.status(200).json(result.rows);
}
@ -64,7 +64,7 @@ export async function getById(req, res) {
const query = `SELECT * FROM comments WHERE id = $1`;
const result = await client.query(query, [id]);
logger.write("successfully get comment", 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
}
@ -76,7 +76,7 @@ export async function update(req, res) {
const query = `UPDATE comments SET content = $1 WHERE id = $2`;
const result = await client.query(query, [req.body.content, id]);
logger.write("successfully update comment", 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
}
@ -88,6 +88,6 @@ export async function del(req, res) {
const query = `DELETE FROM comments WHERE id = $1`;
const result = await client.query(query, [id]);
logger.write("successfully deleted comment", 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
}

6
backend/app/controllers/oauth.controller.js

@ -102,7 +102,7 @@ export async function callback(req, res, next) {
await client.query(playlistQuery, [dbUser.id]);
}
client.end();
client.release();
// Generate JWT token
const payload = {
@ -145,11 +145,11 @@ export async function getUserInfo(req, res) {
const result = await client.query(query, [decoded.id]);
if (!result.rows[0]) {
client.end();
client.release();
return res.status(404).json({ error: "User not found" });
}
client.end();
client.release();
res.status(200).json({ user: result.rows[0] });
} catch (error) {

42
backend/app/controllers/playlist.controller.js

@ -14,11 +14,11 @@ export async function create(req, res) {
try {
const result = await client.query(query, [name, userId]);
logger.write("Playlist created with id " + result.rows[0].id, 200);
client.end()
client.release()
res.status(200).json({ id: result.rows[0].id });
} catch (error) {
logger.write("Error creating playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -33,11 +33,11 @@ export async function addVideo(req, res) {
try {
const result = await client.query(query, [video, id]);
logger.write("Video added to playlist with id " + id, 200);
client.end();
client.release();
res.status(200).json({id: result.rows[0].id});
} catch (error) {
logger.write("Error adding video to playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({error: "Internal server error"});
}
}
@ -64,16 +64,16 @@ export async function getByUser(req, res) {
const result = await client.query(query, [id]);
if (result.rows.length === 0) {
logger.write("No playlists found for user with id " + id, 404);
client.end();
client.release();
res.status(404).json({ error: "No playlists found" });
return;
}
logger.write("Playlists retrieved for user with id " + id, 200);
client.end();
client.release();
res.status(200).json(result.rows);
} catch (error) {
logger.write("Error retrieving playlists: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -145,16 +145,16 @@ export async function getById(req, res) {
const result = await client.query(query, [id]);
if (result.rows.length === 0) {
logger.write("No playlist found with id " + id, 404);
client.end();
client.release();
res.status(404).json({ error: "Playlist not found" });
return;
}
logger.write("Playlist retrieved with id " + id, 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
} catch (error) {
logger.write("Error retrieving playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -171,16 +171,16 @@ export async function update(req, res) {
const result = await client.query(query, [name, id]);
if (result.rows.length === 0) {
logger.write("No playlist found with id " + id, 404);
client.end();
client.release();
res.status(404).json({ error: "Playlist not found", result: result.rows, query: query });
return;
}
logger.write("Playlist updated with id " + result.rows[0].id, 200);
client.end();
client.release();
res.status(200).json({ id: result.rows[0].id });
} catch (error) {
logger.write("Error updating playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -196,16 +196,16 @@ export async function deleteVideo(req, res) {
const result = await client.query(query, [videoId, id]);
if (result.rows.length === 0) {
logger.write("No video found in playlist with id " + id, 404);
client.end();
client.release();
res.status(404).json({ error: "Video not found in playlist" });
return;
}
logger.write("Video deleted from playlist with id " + id, 200);
client.end();
client.release();
res.status(200).json({ id: result.rows[0].id });
} catch (error) {
logger.write("Error deleting video from playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -220,11 +220,11 @@ export async function del(req, res) {
try {
const result = await client.query(query, [id]);
logger.write("Playlist deleted", 200);
client.end()
client.release()
res.status(200).json({ "message": "playlist deleted" });
} catch (error) {
logger.write("Error deleting playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}
}
@ -286,16 +286,16 @@ export async function getSeeLater(req, res) {
const result = await client.query(query, [userId]);
if (result.rows.length === 0) {
logger.write("No 'See Later' playlist found for user with id " + userId, 404);
client.end();
client.release();
res.status(404).json({ error: "'See Later' playlist not found" });
return;
}
logger.write("'See Later' playlist retrieved for user with id " + userId, 200);
client.end();
client.release();
res.status(200).json(result.rows[0].videos);
} catch (error) {
logger.write("Error retrieving 'See Later' playlist: " + error.message, 500);
client.end();
client.release();
res.status(500).json({ error: "Internal server error" });
}

82
backend/app/controllers/recommendation.controller.js

@ -188,68 +188,73 @@ export async function getRecommendations(req, res) {
let result = await client.query(query, [claims.id]);
client.end()
client.release()
res.status(200).json(result.rows);
}
}
export async function getTrendingVideos(req, res) {
const client = await getClient();
try {
// GET 10 VIDEOS WITH THE MOST LIKES AND COMMENTS
let client = await getClient();
// Optimized single query to get all trending video data
let queryTrendingVideos = `
SELECT v.id, v.title, v.description, v.release_date, v.thumbnail, v.visibility,
COUNT(DISTINCT l.id) AS like_count, COUNT(DISTINCT c.id) AS comment_count
SELECT
v.id,
v.title,
v.description,
v.release_date,
v.thumbnail,
v.visibility,
COUNT(DISTINCT l.id) AS like_count,
COUNT(DISTINCT c.id) AS comment_count,
COUNT(DISTINCT h.id) AS views,
ch.id AS creator_id,
ch.name AS creator_name,
u.picture AS creator_profile_picture
FROM videos v
LEFT JOIN likes l ON v.id = l.video
LEFT JOIN comments c ON v.id = c.video
LEFT JOIN history h ON v.id = h.video
LEFT JOIN channels ch ON v.channel = ch.id
LEFT JOIN users u ON ch.owner = u.id
WHERE v.visibility = 'public'
GROUP BY v.id
ORDER BY like_count DESC, comment_count DESC
GROUP BY v.id, ch.id, ch.name, u.picture
ORDER BY like_count DESC, comment_count DESC, views DESC
LIMIT 10
`;
`;
let result = await client.query(queryTrendingVideos);
const trendingVideos = result.rows;
for (let video of trendingVideos) {
// Get the number of views for each video
let viewsQuery = `SELECT COUNT(*) AS view_count FROM history WHERE video = $1;`;
let viewsResult = await client.query(viewsQuery, [video.id]);
video.views = viewsResult.rows[0].view_count;
// Get the creator of each video
let creatorQuery = `SELECT c.id, c.name FROM channels c JOIN videos v ON c.id = v.channel WHERE v.id = $1;`;
let creatorResult = await client.query(creatorQuery, [video.id]);
if (creatorResult.rows.length > 0) {
video.creator = creatorResult.rows[0];
} else {
video.creator = {id: null, name: "Unknown"};
const trendingVideos = result.rows.map(video => ({
id: video.id,
title: video.title,
description: video.description,
release_date: video.release_date,
thumbnail: video.thumbnail,
visibility: video.visibility,
like_count: video.like_count,
comment_count: video.comment_count,
views: video.views,
creator: {
id: video.creator_id,
name: video.creator_name,
profilePicture: video.creator_profile_picture
}
}));
// GET THE PROFILE PICTURE OF THE CREATOR
let profilePictureQuery = `SELECT u.picture FROM users u JOIN channels c ON u.id = c.owner WHERE c.id = $1;`;
let profilePictureResult = await client.query(profilePictureQuery, [video.creator.id]);
if (profilePictureResult.rows.length > 0) {
video.creator.profilePicture = profilePictureResult.rows[0].picture;
} else {
video.creator.profilePicture = null; // Default or placeholder image can be set here
}
}
client.end();
res.status(200).json(trendingVideos);
} catch (error) {
console.error("Error fetching trending videos:", error);
res.status(500).json({error: "Internal server error while fetching trending videos."});
} finally {
client.release();
}
}
export async function getTopCreators(req, res) {
const client = await getClient();
try {
// GET TOP 5 CREATORS BASED ON NUMBER OF SUBSCRIBERS
let client = await getClient();
let queryTopCreators = `
SELECT c.id, c.name, c.description, u.picture AS profilePicture, COUNT(s.id) AS subscriber_count
FROM channels c
@ -258,14 +263,15 @@ export async function getTopCreators(req, res) {
GROUP BY c.id, u.picture
ORDER BY subscriber_count DESC
LIMIT 10;
`;
`;
let result = await client.query(queryTopCreators);
const topCreators = result.rows;
client.end();
res.status(200).json(topCreators);
} catch (error) {
console.error("Error fetching top creators:", error);
res.status(500).json({error: "Internal server error while fetching top creators."});
} finally {
client.release();
}
}

4
backend/app/controllers/search.controller.js

@ -54,7 +54,7 @@ export async function search(req, res) {
videoResults.push(video);
}
client.end()
client.release()
return res.status(200).json(videoResults);
@ -83,7 +83,7 @@ export async function search(req, res) {
channelResults.push(channel);
}
client.end()
client.release()
return res.status(200).json(channelResults);

115
backend/app/controllers/user.controller.js

@ -121,15 +121,16 @@ export async function register(req, res) {
const insertQuery = `INSERT INTO email_verification (email, token, expires_at) VALUES ($1, $2, $3)`;
await client.query(insertQuery, [user.email, token, expirationDate]);
client.end();
console.log("Successfully registered");
client.end();
logger.write("successfully registered", 200);
res.status(200).send({ user: user });
} catch (err) {
console.log(err);
logger?.write("failed to register user", 500);
res.status(500).json({ error: "Internal server error" });
} finally {
client.release();
}
}
@ -165,7 +166,7 @@ export async function verifyEmail(req, res) {
logger.write("failed to verify email for " + email, 500);
res.status(500).json({ error: "Internal server error" });
} finally {
client.end();
client.release();
}
}
@ -180,43 +181,49 @@ export async function login(req, res) {
const client = await getClient();
let query = `SELECT id, username, email, picture, password FROM users WHERE username = $1`;
const result = await client.query(query, [user.username]);
try {
let query = `SELECT id, username, email, picture, password FROM users WHERE username = $1`;
const result = await client.query(query, [user.username]);
const userInBase = result.rows[0];
const userInBase = result.rows[0];
if (!userInBase) {
logger.write("failed to login", 401)
res.status(401).json({ error: "Invalid credentials" });
return
}
if (!userInBase) {
logger.write("failed to login", 401)
res.status(401).json({ error: "Invalid credentials" });
return
}
const isPasswordValid = await bcrypt.compare(req.body.password, userInBase.password);
const isPasswordValid = await bcrypt.compare(req.body.password, userInBase.password);
if (!isPasswordValid) {
logger.write("failed to login", 401)
res.status(401).json({ error: "Invalid credentials" });
return
}
const payload = {
id: userInBase.id,
username: userInBase.username,
}
if (!isPasswordValid) {
logger.write("failed to login", 401)
res.status(401).json({ error: "Invalid credentials" });
return
}
const token = jwt.sign(payload, process.env.JWT_SECRET);
const payload = {
id: userInBase.id,
username: userInBase.username,
}
const userData = {
id: userInBase.id,
username: userInBase.username,
email: userInBase.email,
picture: userInBase.picture
}
const token = jwt.sign(payload, process.env.JWT_SECRET);
logger.write("Successfully logged in", 200);
client.end();
res.status(200).json({ token: token, user: userData });
const userData = {
id: userInBase.id,
username: userInBase.username,
email: userInBase.email,
picture: userInBase.picture
}
logger.write("Successfully logged in", 200);
res.status(200).json({ token: token, user: userData });
} catch (err) {
console.log(err);
logger?.write("failed to login", 500);
res.status(500).json({ error: "Internal server error" });
} finally {
client.release();
}
}
export async function getById(req, res) {
@ -230,7 +237,7 @@ export async function getById(req, res) {
const result = await client.query(query, [id]);
if (!result.rows[0]) {
logger.write("failed to retrieve user " + id + " because it doesn't exist", 404);
client.end()
client.release()
res.status(404).json({ error: "Not Found" });
return
}
@ -249,12 +256,12 @@ export async function getByUsername(req, res) {
const result = await client.query(query, [username]);
if (!result.rows[0]) {
logger.write("failed to retrieve user " + username + " because it doesn't exist", 404);
client.end()
client.release()
res.status(404).json({ error: "Not Found" });
return
}
logger.write("successfully retrieved user " + username, 200);
client.end();
client.release();
return res.status(200).json({ user: result.rows[0] });
}
@ -282,7 +289,7 @@ export async function update(req, res) {
const emailResult = await client.query(emailQuery, [user.email]);
if (emailResult.rows[0]) {
logger.write("failed to update because email is already used", 400)
client.end();
client.release();
res.status(400).json({ error: "Email already exists" });
}
}
@ -292,7 +299,7 @@ export async function update(req, res) {
const usernameResult = await client.query(usernameQuery, [user.username]);
if (usernameResult.rows[0]) {
logger.write("failed to update because username is already used", 400)
client.end();
client.release();
res.status(400).json({ error: "Username already exists" });
}
}
@ -329,11 +336,11 @@ export async function update(req, res) {
const updateQuery = `UPDATE users SET email = $1, username = $2, password = $3, picture = $4 WHERE id = $5 RETURNING id, email, username, picture`;
const result = await client.query(updateQuery, [user.email, user.username, user.password, profilePicture, id]);
logger.write("successfully updated user " + id, 200);
client.end();
client.release();
res.status(200).json(result.rows[0]);
} catch (err) {
console.log(err);
client.end()
client.release()
res.status(500).json({ error: err });
}
@ -347,7 +354,7 @@ export async function deleteUser(req, res) {
const query = `DELETE FROM users WHERE id = $1`;
await client.query(query, [id]);
logger.write("successfully deleted user " + id);
client.end();
client.release();
res.status(200).json({ message: 'User deleted' });
}
@ -362,13 +369,13 @@ export async function getChannel(req, res) {
if (!result.rows[0]) {
logger.write("failed to retrieve channel of user " + id + " because it doesn't exist", 404);
client.end();
client.release();
res.status(404).json({ error: "Channel Not Found" });
return;
}
logger.write("successfully retrieved channel of user " + id, 200);
client.end();
client.release();
res.status(200).json({ channel: result.rows[0] });
}
@ -415,12 +422,12 @@ export async function getHistory(req, res) {
if (!result.rows[0]) {
logger.write("failed to retrieve history of user " + id + " because it doesn't exist", 404);
res.status(404).json({ error: "History Not Found" });
client.end();
client.release();
return;
}
logger.write("successfully retrieved history of user " + id, 200);
client.end();
client.release();
res.status(200).json(videos);
}
@ -439,11 +446,11 @@ export async function isSubscribed(req, res) {
if (result.rows[0]) {
logger.write(`user ${userId} is subscribed to channel ${channelId}`, 200);
client.end();
client.release();
return res.status(200).json({ subscribed: true });
} else {
logger.write(`user ${userId} is not subscribed to channel ${channelId}`, 200);
client.end();
client.release();
return res.status(200).json({ subscribed: false });
}
}
@ -459,12 +466,12 @@ export async function searchByUsername(req, res) {
if (result.rows.length === 0) {
logger.write("no user found with username " + username, 404);
client.end();
client.release();
return res.status(404).json({ error: "User Not Found" });
}
logger.write("successfully found user with username " + username, 200);
client.end();
client.release();
res.status(200).json(result.rows);
}
@ -492,12 +499,12 @@ export async function getAllSubscriptions(req,res) {
if (result.rows.length === 0) {
logger.write("no subscriptions found for user " + userId, 404);
client.end();
client.release();
return res.status(404).json({ error: "No Subscriptions Found" });
}
logger.write("successfully retrieved all subscriptions of user " + userId, 200);
client.end();
client.release();
res.status(200).json(result.rows);
}
@ -534,7 +541,7 @@ export async function getAllSubscriptionVideos(req, res) {
LEFT JOIN history ON videos.id = history.video
WHERE
subscriptions.owner = $4
subscriptions.owner = $1
GROUP BY
videos.id,
channels.id,
@ -544,11 +551,11 @@ export async function getAllSubscriptionVideos(req, res) {
if (result.rows.length === 0) {
logger.write("no subscriptions found for user " + userId, 404);
client.end();
client.release();
return res.status(404).json({ error: "No Subscriptions Found" });
}
logger.write("successfully retrieved all subscriptions of user " + userId, 200);
client.end();
client.release();
res.status(200).json(result.rows);
}

34
backend/app/controllers/video.controller.js

@ -23,7 +23,7 @@ export async function upload(req, res) {
const query = `SELECT * FROM videos WHERE slug = $1`;
const result = await client.query(query, [hex]);
client.end();
client.release();
if (result.rows.length === 0) {
isGenerate = true;
req.body.slug = hex;
@ -157,7 +157,7 @@ export async function upload(req, res) {
}
logger.write("successfully uploaded video", 200);
await client.end()
await client.release()
res.status(200).json({ "message": "Successfully uploaded video", "id": id });
}
@ -181,7 +181,7 @@ export async function uploadThumbnail(req, res) {
const updateQuery = `UPDATE videos SET thumbnail = $1 WHERE id = $2`;
await client.query(updateQuery, [file, req.body.video]);
logger.write("successfully uploaded thumbnail", 200);
await client.end();
await client.release();
res.status(200).json({ "message": "Successfully uploaded thumbnail" });
}
@ -234,7 +234,7 @@ export async function getById(req, res) {
video.authorizedUsers = authorizedUsersResult.rows;
logger.write("successfully get video " + id, 200);
client.end()
client.release()
res.status(200).json(video);
}
@ -246,7 +246,7 @@ export async function getByChannel(req, res) {
const query = `SELECT * FROM videos WHERE channel = $1`;
const result = await client.query(query, [id]);
logger.write("successfully get video from channel " + id, 200);
client.end()
client.release()
res.status(200).json(result.rows);
}
@ -297,7 +297,7 @@ export async function update(req, res) {
`;
const result = await client.query(resultQuery, [id]);
logger.write("successfully updated video", 200);
client.end()
client.release()
res.status(200).json(result.rows[0]);
}
@ -315,7 +315,7 @@ export async function updateVideo(req, res) {
fs.unlink(pathToDelete, (error) => {
if (error) {
logger.write(error, 500);
client.end()
client.release()
res.status(500).json({ "message": "Failed to delete video" });
return
}
@ -327,7 +327,7 @@ export async function updateVideo(req, res) {
fs.writeFileSync(destinationPath, fileBuffer);
logger.write("successfully updated video", 200);
client.end()
client.release()
res.status(200).json({ "message": "Successfully updated video" });
})
@ -349,7 +349,7 @@ export async function del(req, res) {
fs.unlink(pathToDelete, (error) => {
if (error) {
logger.write(error, 500);
client.end()
client.release()
res.status(500).json({ "message": "Failed to delete video" });
return
}
@ -364,7 +364,7 @@ export async function del(req, res) {
const query = `DELETE FROM videos WHERE id = $1`;
await client.query(query, [id]);
logger.write("successfully deleted video", 200);
client.end()
client.release()
res.status(200).json({ "message": "Successfully deleted video" });
})
})
@ -395,7 +395,7 @@ export async function toggleLike(req, res) {
const likesCount = likesCountResult.rows[0].like_count;
logger.write("no likes found adding likes for video " + id, 200);
client.end();
client.release();
res.status(200).json({ "message": "Successfully added like", "likes": likesCount });
} else {
const query = `DELETE FROM likes WHERE owner = $1 AND video = $2`;
@ -407,7 +407,7 @@ export async function toggleLike(req, res) {
const likesCount = likesCountResult.rows[0].like_count;
logger.write("likes found, removing like for video " + id, 200);
client.end();
client.release();
res.status(200).json({ "message": "Successfully removed like", "likes": likesCount });
}
@ -462,7 +462,7 @@ export async function addTags(req, res) {
const updatedTags = updatedTagsResult.rows;
logger.write("successfully added tags to video " + videoId, 200);
await client.end();
await client.release();
res.status(200).json({ "message": "Successfully added tags to video", "tags": updatedTags.map(tag => tag.name) });
}
@ -522,7 +522,7 @@ export async function getSimilarVideos(req, res) {
}
logger.write("successfully get similar videos for video " + id, 200);
await client.end();
await client.release();
res.status(200).json(result.rows);
}
@ -573,7 +573,7 @@ export async function getLikesPerDay(req, res) {
logger.write("Error retrieving likes per day: " + error.message, 500);
res.status(500).json({ error: "Internal server error" });
} finally {
await client.end();
await client.release();
}
}
@ -596,7 +596,7 @@ export async function addViews(req, res) {
}
logger.write("successfully added views for video " + id, 200);
await client.end();
await client.release();
res.status(200).json({ "message": "Successfully added views" });
}
@ -631,6 +631,6 @@ export async function updateAuthorizedUsers(req, res) {
logger.write("Error updating authorized users: " + error.message, 500);
res.status(500).json({ error: "Internal server error" });
} finally {
await client.end();
await client.release();
}
}

94
backend/app/middlewares/channel.middleware.js

@ -22,55 +22,70 @@ export const ChannelCreate = {
export async function doUserHaveChannel(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT id FROM channels WHERE owner = ${req.body.owner}`;
const result = await client.query(query);
try {
const query = `SELECT id FROM channels WHERE owner = $1`;
const result = await client.query(query, [req.body.owner]);
if (result.rows[0]) {
logger.write("failed because user already has a channel", 400);
res.status(400).json({error: "User already own a channel"})
} else {
next()
if (result.rows[0]) {
logger.write("failed because user already has a channel", 400);
res.status(400).json({error: "User already own a channel"})
} else {
next()
}
} finally {
client.release();
}
}
export async function doChannelNameExists(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT * FROM channels WHERE name = '${req.body.name}'`;
const result = await client.query(query);
try {
const query = `SELECT * FROM channels WHERE name = $1`;
const result = await client.query(query, [req.body.name]);
if (result.rows[0]) {
logger.write("failed because channel name already exist", 400)
res.status(400).json({error: "Channel name already used"})
} else {
next()
if (result.rows[0]) {
logger.write("failed because channel name already exist", 400)
res.status(400).json({error: "Channel name already used"})
} else {
next()
}
} finally {
client.release();
}
}
export async function doChannelExists(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT id FROM channels WHERE id = '${req.params.id}'`;
const result = await client.query(query);
if (result.rows[0]) {
next()
} else {
logger.write("failed to retrieve channel because it doesn't exist", 404);
res.status(404).json({error: "Not Found"})
try {
const query = `SELECT id FROM channels WHERE id = $1`;
const result = await client.query(query, [req.params.id]);
if (result.rows[0]) {
next()
} else {
logger.write("failed to retrieve channel because it doesn't exist", 404);
res.status(404).json({error: "Not Found"})
}
} finally {
client.release();
}
}
export async function doChannelExistBody(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT id FROM channels WHERE id = ${req.body.channel}`;
const result = await client.query(query);
if (result.rows[0]) {
next()
} else {
logger.write("failed to retrieve channel because it doesn't exist", 404);
res.status(404).json({error: "Not Found"})
try {
const query = `SELECT id FROM channels WHERE id = $1`;
const result = await client.query(query, [req.body.channel]);
if (result.rows[0]) {
next()
} else {
logger.write("failed to retrieve channel because it doesn't exist", 404);
res.status(404).json({error: "Not Found"})
}
} finally {
client.release();
}
}
@ -83,14 +98,17 @@ export async function isOwner(req, res, next) {
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT id, owner FROM channels WHERE id = ${id}`;
const result = await client.query(query);
const channel = result.rows[0];
if (channel.owner != claims.id) {
logger.write("failed because user do not own the channel", 403);
res.status(403).json({error: "You're not the owner of the channel"})
} else {
next()
try {
const query = `SELECT id, owner FROM channels WHERE id = $1`;
const result = await client.query(query, [id]);
const channel = result.rows[0];
if (channel.owner != claims.id) {
logger.write("failed because user do not own the channel", 403);
res.status(403).json({error: "You're not the owner of the channel"})
} else {
next()
}
} finally {
client.release();
}
}

36
backend/app/middlewares/comment.middleware.js

@ -20,14 +20,18 @@ export async function doCommentExists(req, res, next) {
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT * FROM comments WHERE id = ${id}`;
const result = await client.query(query);
if (result.rows.length === 0) {
logger.write("comment not found", 404);
res.status(404).json({error: "comment not found"});
return
try {
const query = `SELECT * FROM comments WHERE id = $1`;
const result = await client.query(query, [id]);
if (result.rows.length === 0) {
logger.write("comment not found", 404);
res.status(404).json({error: "comment not found"});
return
}
next()
} finally {
client.release();
}
next()
}
export async function isAuthor(req, res, next) {
@ -37,12 +41,16 @@ export async function isAuthor(req, res, next) {
const userId = claims.id;
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT * FROM comments WHERE id = ${id}`;
const result = await client.query(query);
if (userId !== result.rows[0].author) {
logger.write("is not author of the comment", 403);
res.status(403).json({error: "You do not have permission"});
return
try {
const query = `SELECT * FROM comments WHERE id = $1`;
const result = await client.query(query, [id]);
if (userId !== result.rows[0].author) {
logger.write("is not author of the comment", 403);
res.status(403).json({error: "You do not have permission"});
return
}
next()
} finally {
client.release();
}
next()
}

70
backend/app/middlewares/playlist.middleware.js

@ -16,20 +16,23 @@ export async function doPlaylistExists(req, res, next) {
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT id FROM playlists WHERE id = ${id}`;
try {
var result = await client.query(query);
const query = `SELECT id FROM playlists WHERE id = $1`;
const result = await client.query(query, [id]);
if (result.rows.length === 0) {
logger.write("No playlist with id " + id, 404);
res.status(404).json({error: "Playlist not found"});
return;
}
next();
} catch (error) {
logger.write("Error checking playlist existence: " + error.message, 500);
res.status(500).json({error: error});
return;
} finally {
client.release();
}
if (result.rows.length === 0) {
logger.write("No playlist with id " + id, 404);
res.status(404).json({error: "Playlist not found"});
return;
}
next();
}
export async function isOwner(req, res, next) {
@ -41,18 +44,20 @@ export async function isOwner(req, res, next) {
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT owner FROM playlists WHERE id = ${id}`;
const result = await client.query(query);
if(result.rows[0].owner !== userId) {
logger.write("user not the owner of the playlist with id " + id, 403);
res.status(403).json({error: "You do not have permission"});
return;
try {
const query = `SELECT owner FROM playlists WHERE id = $1`;
const result = await client.query(query, [id]);
if(result.rows[0].owner !== userId) {
logger.write("user not the owner of the playlist with id " + id, 403);
res.status(403).json({error: "You do not have permission"});
return;
}
next();
} finally {
client.release();
}
next();
}
export async function isVideoInPlaylist(req, res, next) {
@ -61,22 +66,23 @@ export async function isVideoInPlaylist(req, res, next) {
const videoId = req.params.videoId;
const logger = req.body.logger;
const client = await getClient();
const query = `SELECT id FROM playlist_elements WHERE video = ${videoId} AND playlist = ${id}`;
try {
var result = await client.query(query);
const query = `SELECT id FROM playlist_elements WHERE video = $1 AND playlist = $2`;
const result = await client.query(query, [videoId, id]);
if(result.rows.length === 0) {
logger.write("video " + videoId + "not found in playlist with id " + id, 404 );
res.status(404).json({error: "Video " + videoId + "not found"});
return;
}
next();
} catch (error) {
logger.write("Error checking video in playlist: " + query, 500);
logger.write("Error checking video in playlist: " + error.message, 500);
res.status(500).json({error: error });
return;
} finally {
client.release();
}
if(result.rows.length === 0) {
logger.write("video " + videoId + "not found in playlist with id " + id, 404 );
res.status(404).json({error: "Video " + videoId + "not found"});
return;
}
next();
}

74
backend/app/middlewares/user.middleware.js

@ -44,55 +44,69 @@ export const UserSearch = {
export async function doEmailExists(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT * FROM users WHERE email = '${req.body.email}'`;
const result = await client.query(query);
try {
const query = `SELECT * FROM users WHERE email = $1`;
const result = await client.query(query, [req.body.email]);
if (result.rows.length > 0) {
logger.write("failed because email already exists", 400)
res.status(400).send({error: "Email already exists"})
} else {
next()
if (result.rows.length > 0) {
logger.write("failed because email already exists", 400)
res.status(400).send({error: "Email already exists"})
} else {
next()
}
} finally {
client.release();
}
}
export async function doUsernameExists(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT * FROM users WHERE username = '${req.body.username}'`;
const result = await client.query(query);
if (result.rows.length > 0) {
logger.write("failed because username already exists", 400)
res.status(400).send({error: "Username already exists"})
} else {
next()
try {
const query = `SELECT * FROM users WHERE username = $1`;
const result = await client.query(query, [req.body.username]);
if (result.rows.length > 0) {
logger.write("failed because username already exists", 400)
res.status(400).send({error: "Username already exists"})
} else {
next()
}
} finally {
client.release();
}
}
export async function doUserExists(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT id FROM users WHERE id = ${req.params.id}`;
const result = await client.query(query);
if (result.rows.length > 0) {
next()
}else{
logger.write("failed because user doesn't exists", 404)
res.status(404).json({error: "Not Found"})
try {
const query = `SELECT id FROM users WHERE id = $1`;
const result = await client.query(query, [req.params.id]);
if (result.rows.length > 0) {
next()
}else{
logger.write("failed because user doesn't exists", 404)
res.status(404).json({error: "Not Found"})
}
} finally {
client.release();
}
}
export async function doUserExistsBody(req, res, next) {
const client = await getClient();
const logger = req.body.logger;
const query = `SELECT id FROM users WHERE id = ${req.body.owner}`;
const result = await client.query(query);
if (result.rows.length > 0) {
next()
}else{
logger.write("failed because user doesn't exists", 404)
res.status(404).json({error: "Not Found"})
try {
const query = `SELECT id FROM users WHERE id = $1`;
const result = await client.query(query, [req.body.owner]);
if (result.rows.length > 0) {
next()
}else{
logger.write("failed because user doesn't exists", 404)
res.status(404).json({error: "Not Found"})
}
} finally {
client.release();
}
}

132
backend/app/middlewares/video.middleware.js

@ -50,15 +50,19 @@ export async function isOwner(req, res, next) {
const token = req.headers.authorization.split(' ')[1];
const claims = jwt.decode(token);
const client = await getClient();
const channelQuery = `SELECT owner FROM channels WHERE id = '${channelId}'`;
const channelResult = await client.query(channelQuery);
const channelInBase = channelResult.rows[0];
if (channelInBase.owner !== claims.id) {
logger.write("failed because user is not owner", 403);
res.status(403).json({error: "Not authorized"});
return
try {
const channelQuery = `SELECT owner FROM channels WHERE id = $1`;
const channelResult = await client.query(channelQuery, [channelId]);
const channelInBase = channelResult.rows[0];
if (channelInBase.owner !== claims.id) {
logger.write("failed because user is not owner", 403);
res.status(403).json({error: "Not authorized"});
return
}
next()
} finally {
client.release();
}
next()
}
export async function doVideoExists(req, res, next) {
@ -66,16 +70,19 @@ export async function doVideoExists(req, res, next) {
const videoId = req.body.video;
const client = await getClient();
const query = `SELECT * FROM videos WHERE id = ${videoId}`;
const result = await client.query(query);
const videos = result.rows;
if (videos.length === 0) {
logger.write("failed because video not found", 404);
res.status(404).json({error: "Not Found"});
return
try {
const query = `SELECT * FROM videos WHERE id = $1`;
const result = await client.query(query, [videoId]);
const videos = result.rows;
if (videos.length === 0) {
logger.write("failed because video not found", 404);
res.status(404).json({error: "Not Found"});
return
}
next()
} finally {
client.release();
}
next()
}
export async function doVideoExistsParam(req, res, next) {
@ -83,16 +90,19 @@ export async function doVideoExistsParam(req, res, next) {
const videoId = req.params.id;
const client = await getClient();
const query = `SELECT * FROM videos WHERE id = ${videoId}`;
const result = await client.query(query);
const video = result.rows[0];
if (!video) {
logger.write("failed because video not found", 404);
res.status(404).json({error: "Not Found"});
return
try {
const query = `SELECT * FROM videos WHERE id = $1`;
const result = await client.query(query, [videoId]);
const video = result.rows[0];
if (!video) {
logger.write("failed because video not found", 404);
res.status(404).json({error: "Not Found"});
return
}
next()
} finally {
client.release();
}
next()
}
export async function doAuthorizedUserExists(req, res, next) {
@ -112,16 +122,19 @@ export async function doAuthorizedUserExists(req, res, next) {
if (authorizedUsers && Array.isArray(authorizedUsers) && authorizedUsers.length > 0) {
const client = await getClient();
for (const userId of authorizedUsers) {
const query = `SELECT id FROM users WHERE id = $1`;
const result = await client.query(query, [userId]);
const foundUser = result.rows[0];
if (!foundUser) {
logger.write("failed because authorized user not found", 404);
res.status(404).json({error: "Not Found"});
return
try {
for (const userId of authorizedUsers) {
const query = `SELECT id FROM users WHERE id = $1`;
const result = await client.query(query, [userId]);
const foundUser = result.rows[0];
if (!foundUser) {
logger.write("failed because authorized user not found", 404);
res.status(404).json({error: "Not Found"});
return
}
}
} finally {
client.release();
}
}
next()
@ -132,34 +145,37 @@ export async function hasAccess(req, res, next) {
const videoId = req.params.id;
const client = await getClient();
const videoQuery = "SELECT visibility FROM videos WHERE id = $1";
const videoResult = await client.query(videoQuery, [videoId]);
const video = videoResult.rows[0];
try {
const videoQuery = "SELECT visibility FROM videos WHERE id = $1";
const videoResult = await client.query(videoQuery, [videoId]);
const video = videoResult.rows[0];
console.log(video);
console.log(video);
if (video.visibility === 'private') {
const token = req.headers.authorization?.split(" ")[1];
if (video.visibility === 'private') {
const token = req.headers.authorization?.split(" ")[1];
if (!req.headers.authorization || !token) {
logger.write("failed because no token provided", 401);
res.status(401).json({error: "Unauthorized"});
return;
}
if (!req.headers.authorization || !token) {
logger.write("failed because no token provided", 401);
res.status(401).json({error: "Unauthorized"});
return;
}
const claims = jwt.decode(token);
const userId = claims.id;
const query = `SELECT * FROM video_authorized_users WHERE video_id = $1 AND user_id = $2`;
const result = await client.query(query, [videoId, userId]);
const isAuthorized = result.rows.length > 0;
const claims = jwt.decode(token);
const userId = claims.id;
const query = `SELECT * FROM video_authorized_users WHERE video_id = $1 AND user_id = $2`;
const result = await client.query(query, [videoId, userId]);
const isAuthorized = result.rows.length > 0;
if (!isAuthorized) {
logger.write("failed because user is not authorized", 403);
res.status(403).json({error: "Not authorized"});
return;
if (!isAuthorized) {
logger.write("failed because user is not authorized", 403);
res.status(403).json({error: "Not authorized"});
return;
}
}
next();
} finally {
client.release();
}
next();
}

35
backend/app/utils/database.js

@ -1,18 +1,31 @@
import pg from "pg";
// Create a connection pool instead of individual connections
const pool = new pg.Pool({
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
host: process.env.POSTGRES_HOST,
database: process.env.POSTGRES_DB,
port: 5432,
max: 30, // Increased maximum number of connections in the pool
idleTimeoutMillis: 30000, // Close idle connections after 30 seconds
connectionTimeoutMillis: 10000, // Increased timeout to 10 seconds
acquireTimeoutMillis: 10000, // Wait up to 10 seconds for a connection
});
export async function getClient() {
const client = new pg.Client({
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
host: process.env.POSTGRES_HOST,
database: process.env.POSTGRES_DB,
port: 5432
})
await client.connect();
return client;
// Use pool.connect() instead of creating new clients
return await pool.connect();
}
// Graceful shutdown
process.on('SIGINT', () => {
pool.end(() => {
console.log('Pool has ended');
process.exit(0);
});
});
export async function initDb() {
const client = await getClient();
@ -143,7 +156,7 @@ export async function initDb() {
} catch (e) {
console.error("Error initializing database:", e);
} finally {
client.end();
client.release();
}
}

943
backend/logs/access.log

@ -10459,3 +10459,946 @@
[2025-08-26 16:35:20.454] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-26 16:35:21.161] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-26 16:35:47.725] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 09:33:01.789] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:33:01.797] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:34:34.161] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:34:34.167] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:38:02.615] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:38:02.619] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:38:41.796] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:38:41.804] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:38:57.221] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:38:57.226] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:38:57.234] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:39:36.309] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:39:36.313] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:39:36.321] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:39:36.328] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:41:19.467] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 09:41:22.182] [undefined] GET(/:id): try to get video 8
[2025-08-27 09:41:22.185] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 09:41:22.195] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 09:41:22.221] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 09:41:22.238] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 09:41:22.279] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 09:41:22.289] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 09:41:28.989] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 09:44:05.985] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:44:05.991] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:44:05.996] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:44:06.001] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:48:53.674] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:48:53.677] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:48:53.685] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:48:53.689] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:08.453] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:08.457] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:08.465] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:08.469] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:21.784] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:21.788] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:21.801] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:21.805] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:23.976] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 09:49:26.133] [undefined] GET(/:id): try to get video 8
[2025-08-27 09:49:26.136] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 09:49:26.146] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 09:49:26.194] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 09:49:26.208] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 09:49:26.281] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 09:49:26.290] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 09:49:28.224] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 5
[2025-08-27 09:49:28.239] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-27 09:49:29.053] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 5
[2025-08-27 09:49:29.071] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-27 09:49:31.999] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:32.002] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:32.010] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:32.014] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:54.980] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:54.983] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 09:49:54.992] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 09:49:54.996] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:13.468] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:13.472] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:13.479] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:13.483] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:29.805] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:29.809] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:29.816] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:29.820] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:53.650] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:53.654] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:39:53.662] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:39:53.667] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:10.287] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:10.291] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:10.299] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:10.303] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:20.716] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:20.721] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:20.731] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:20.736] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:38.367] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:38.371] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:38.379] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:38.384] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:45.100] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:45.103] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:45.112] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:45.116] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:51.530] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:51.534] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:40:51.538] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:40:51.543] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:02.917] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:02.921] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:02.929] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:02.933] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:08.425] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:08.429] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:08.433] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:08.437] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:14.106] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:14.110] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:14.118] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:14.122] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:19.163] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:19.167] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:19.170] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:19.174] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:32.815] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:32.819] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:32.827] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:32.831] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:43.208] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:43.213] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:41:43.220] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:41:43.224] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:03.042] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:03.046] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:03.054] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:03.059] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:14.020] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:14.024] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:14.028] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:14.031] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:38.454] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:38.459] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:38.467] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:38.475] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:53.702] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:53.706] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:42:53.714] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:42:53.717] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:13.217] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:13.221] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:13.229] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:13.233] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:24.559] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:24.562] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:24.565] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:24.570] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:33.236] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:33.240] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:33.244] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:33.248] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:43.726] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:43.730] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:43:43.738] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:43:43.742] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:05.284] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:05.288] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:05.296] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:05.300] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:32.285] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:32.289] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:32.297] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:32.301] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:44.117] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:44.121] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:44.129] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:44.135] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:59.510] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:59.514] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:44:59.522] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:44:59.525] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:17.575] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:17.579] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:17.587] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:17.591] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:31.504] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:31.508] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:31.516] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:31.521] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:44.051] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:44.055] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:44.063] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:44.067] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:54.912] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:54.916] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:45:54.924] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:45:54.928] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:46:49.605] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:46:49.608] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:46:49.617] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:46:49.620] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:46:50.401] [undefined] GET(/:id): failed to retrieve channel because it doesn't exist with status 404
[2025-08-27 10:48:22.396] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:48:22.399] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:48:22.413] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:48:22.417] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:27.397] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:27.404] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:27.410] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:27.416] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:56.449] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:56.453] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:56.461] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:56.468] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:57.372] [undefined] GET(/:id): try to get channel with id 5
[2025-08-27 10:49:57.384] [undefined] GET(/:id): Successfully get channel with id 5 with status 200
[2025-08-27 10:49:57.404] [undefined] GET(/:id/channel/subscribed): check if user 4 is subscribed to channel 5
[2025-08-27 10:49:57.408] [undefined] GET(/:id/channel/subscribed): user 4 is subscribed to channel 5 with status 200
[2025-08-27 10:49:59.623] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:59.627] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:49:59.635] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:49:59.639] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:50:03.526] [undefined] GET(/:id): try to get video 8
[2025-08-27 10:50:03.530] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:50:03.541] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 10:50:03.564] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 10:50:03.579] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 10:50:03.655] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 10:50:03.664] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 10:50:04.785] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 10:50:04.789] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 10:50:04.797] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:50:04.801] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 10:50:06.257] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 10:50:07.442] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-27 10:50:07.467] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:50:07.581] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-27 10:50:07.610] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-27 10:50:08.207] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 10:50:09.768] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-27 10:50:09.781] [undefined] GET(/:id/similar): failed due to invalid values with status 400
[2025-08-27 10:50:09.791] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:50:09.797] [undefined] GET(/:id/views): failed due to invalid values with status 400
[2025-08-27 10:50:12.503] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 10:50:14.180] [undefined] GET(/:id): try to get video 8
[2025-08-27 10:50:14.184] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:50:14.198] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 10:50:14.219] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 10:50:14.233] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 10:50:14.301] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 10:50:14.309] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 10:50:18.252] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-27 10:50:18.256] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-27 10:50:18.265] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-27 10:50:18.270] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-27 10:50:18.279] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:50:23.006] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 10:56:28.428] [undefined] GET(/:id): try to get video 8
[2025-08-27 10:56:28.441] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 10:56:28.453] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 10:56:28.466] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 10:56:28.477] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 10:56:28.497] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 10:56:28.510] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 10:56:30.578] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:30.593] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:30.763] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:30.775] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:31.306] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:31.318] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:31.378] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:31.389] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:31.558] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:31.572] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:31.811] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:31.825] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:31.979] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:31.993] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:32.160] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:32.175] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:32.338] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:32.352] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:32.527] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:32.541] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:32.728] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:32.742] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 10:56:32.912] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 10:56:32.927] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 10:56:33.096] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:00:58.168] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 11:01:00.805] [undefined] GET(/:id): try to get video 8
[2025-08-27 11:01:00.808] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 11:01:00.825] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 11:01:00.836] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 11:01:00.841] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 11:01:00.854] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 11:01:00.858] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 11:01:02.475] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:02.489] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:02.690] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:02.704] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:02.893] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:02.908] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:03.076] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:03.092] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:03.283] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:03.291] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:03.481] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:03.497] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:03.681] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:03.698] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:03.888] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:03.903] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:04.111] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:04.127] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:04.296] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:04.312] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:04.496] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:04.512] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:04.703] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:04.719] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:04.926] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:04.944] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:05.140] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:05.156] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:05.329] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:05.345] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:05.549] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:05.564] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:05.750] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:05.765] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:05.938] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:05.955] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:06.158] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:06.172] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:06.341] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:06.357] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:06.542] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:06.556] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:06.722] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:06.737] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:06.907] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:06.923] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:07.109] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:07.124] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:07.294] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:07.311] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:07.493] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:07.511] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:07.675] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:07.690] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:07.874] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:07.890] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:08.068] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:08.082] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:08.243] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:08.258] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:08.439] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:08.443] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:08.643] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:08.648] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:08.828] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:08.843] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:09.036] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:09.051] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:09.235] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:09.250] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:09.393] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:09.411] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:09.605] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:09.619] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:09.848] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:09.866] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:09.992] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.008] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:10.189] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.203] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:10.408] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.414] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:10.595] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.611] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:10.789] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.805] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:10.983] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:10.999] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:11.158] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:11.164] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:11.351] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:11.365] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:11.558] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:11.575] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:11.757] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:11.772] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:11.963] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:11.979] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:12.179] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:12.193] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:12.401] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:12.417] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:12.602] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:12.617] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:12.827] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:12.843] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:13.012] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:13.027] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:13.234] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:13.250] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:13.445] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:13.461] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:13.641] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:13.657] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:13.853] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:13.868] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:14.096] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:14.111] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:14.309] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:14.324] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:14.518] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:14.532] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:14.730] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:14.745] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:14.954] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:14.960] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:15.165] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:15.181] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:15.408] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:15.422] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:15.612] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:15.626] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:15.803] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:15.819] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:15.994] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:16.008] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:16.207] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:16.222] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:16.426] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:16.442] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:16.630] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:16.645] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:16.844] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:16.860] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:17.070] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:17.084] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:17.304] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:17.319] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:17.536] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:17.552] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:17.716] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:17.730] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:17.971] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:17.989] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:18.184] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:18.199] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:18.393] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:18.410] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:18.607] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:18.623] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:18.822] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:18.838] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:19.055] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:19.071] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:19.256] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:19.273] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:19.487] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:19.502] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:19.703] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:19.720] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:19.945] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:19.959] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:20.130] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:20.145] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:20.346] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:20.361] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:20.553] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:20.558] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:20.797] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:20.812] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:21.017] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:21.032] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:21.235] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:21.249] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:21.500] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:21.515] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:21.705] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:21.721] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:21.920] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:21.935] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:22.126] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:22.141] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:22.380] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:22.385] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:22.592] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:22.607] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:22.787] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:22.802] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:23.010] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:23.024] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:23.196] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:23.211] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:23.506] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:23.521] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:23.736] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:23.751] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:23.961] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:23.967] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:24.174] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:24.189] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:24.385] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:24.396] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:24.589] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:24.605] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:24.815] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:24.831] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:25.029] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:25.043] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:01:25.256] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:25.271] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:01:25.432] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:01:25.446] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:03:25.401] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 11:10:14.645] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-27 11:10:46.684] [undefined] POST(/): try to register a user with username: ophé lail and email: youfyouf@live.fr
[2025-08-27 11:10:48.196] [undefined] POST(/): successfully registered with status 200
[2025-08-27 11:12:38.443] [undefined] POST(/verify-email): try to verify email for youfyouf@live.fr with token 510ae
[2025-08-27 11:12:38.465] [undefined] POST(/verify-email): successfully verified email for youfyouf@live.fr with status 200
[2025-08-27 11:12:52.481] [undefined] POST(/login): failed due to invalid values with status 400
[2025-08-27 11:13:01.918] [undefined] POST(/login): try to login with username 'ophé lail'
[2025-08-27 11:13:01.973] [undefined] POST(/login): Successfully logged in with status 200
[2025-08-27 11:13:02.080] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 7 with status 200
[2025-08-27 11:13:30.754] [undefined] GET(/:id): try to get video 8
[2025-08-27 11:13:30.763] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:13:30.771] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 11:13:30.781] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 11:13:30.788] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 11:13:30.799] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 11:13:30.803] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 11:13:40.087] [undefined] POST(/): try to post comment
[2025-08-27 11:13:40.110] [undefined] POST(/): successfully post comment with status 200
[2025-08-27 11:13:52.781] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:13:52.797] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:13:54.657] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 5
[2025-08-27 11:13:54.674] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-27 11:13:58.075] [undefined] POST(/:id): Video added to playlist with id 9 with status 200
[2025-08-27 11:14:05.163] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:14:05.170] [undefined] GET(/:id/channel): failed to retrieve channel of user 7 because it doesn't exist with status 404
[2025-08-27 11:14:05.180] [undefined] GET(/:id/history): try to retrieve history of user 7
[2025-08-27 11:14:05.185] [undefined] GET(/:id/history): successfully retrieved history of user 7 with status 200
[2025-08-27 11:14:05.194] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:14:14.640] [undefined] POST(/): Playlist created with id 10 with status 200
[2025-08-27 11:14:14.657] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:14:16.043] [undefined] GET(/:id): Playlist retrieved with id 10 with status 200
[2025-08-27 11:14:20.664] [undefined] GET(/:id/history): try to retrieve history of user 7
[2025-08-27 11:14:20.674] [undefined] GET(/:id/history): successfully retrieved history of user 7 with status 200
[2025-08-27 11:14:20.687] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:14:20.691] [undefined] GET(/:id/channel): failed to retrieve channel of user 7 because it doesn't exist with status 404
[2025-08-27 11:14:20.696] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:14:32.070] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:14:32.074] [undefined] GET(/:id/channel): failed to retrieve channel of user 7 because it doesn't exist with status 404
[2025-08-27 11:14:38.281] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:14:38.288] [undefined] GET(/:id): try to get video 8
[2025-08-27 11:14:38.299] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 11:14:38.311] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 11:14:38.315] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 11:14:38.355] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 11:14:38.358] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 11:14:44.102] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 7
[2025-08-27 11:14:44.108] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 7 with status 200
[2025-08-27 11:14:44.190] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 7
[2025-08-27 11:14:44.197] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 7 with status 200
[2025-08-27 11:14:46.621] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 7 with status 200
[2025-08-27 11:14:48.207] [undefined] GET(/:id/history): try to retrieve history of user 7
[2025-08-27 11:14:48.213] [undefined] GET(/:id/history): successfully retrieved history of user 7 with status 200
[2025-08-27 11:14:48.226] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:14:48.230] [undefined] GET(/:id/channel): failed to retrieve channel of user 7 because it doesn't exist with status 404
[2025-08-27 11:14:48.236] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:15:03.614] [undefined] POST(/): try to create new channel with owner 7 and name gfy
[2025-08-27 11:15:03.619] [undefined] POST(/): Successfully created new channel with name gfy with status 200
[2025-08-27 11:15:03.647] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:15:03.652] [undefined] GET(/:id/channel): successfully retrieved channel of user 7 with status 200
[2025-08-27 11:15:06.646] [undefined] GET(/:id): try to get channel with id 6
[2025-08-27 11:15:06.663] [undefined] GET(/:id): Successfully get channel with id 6 with status 200
[2025-08-27 11:15:06.670] [undefined] GET(/:id/stats): try to get stats
[2025-08-27 11:15:06.674] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-27 11:15:09.985] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:15:09.991] [undefined] GET(/:id/channel): successfully retrieved channel of user 7 with status 200
[2025-08-27 11:17:05.450] [undefined] GET(/search): try to search user by username s
[2025-08-27 11:17:05.455] [undefined] GET(/search): successfully found user with username s with status 200
[2025-08-27 11:17:05.851] [undefined] GET(/search): try to search user by username sa
[2025-08-27 11:17:05.860] [undefined] GET(/search): successfully found user with username sa with status 200
[2025-08-27 11:17:06.636] [undefined] GET(/search): try to search user by username sac
[2025-08-27 11:17:06.640] [undefined] GET(/search): successfully found user with username sac with status 200
[2025-08-27 11:17:06.985] [undefined] GET(/search): try to search user by username sa
[2025-08-27 11:17:06.992] [undefined] GET(/search): successfully found user with username sa with status 200
[2025-08-27 11:17:07.350] [undefined] GET(/search): try to search user by username s
[2025-08-27 11:17:07.353] [undefined] GET(/search): successfully found user with username s with status 200
[2025-08-27 11:17:08.775] [undefined] GET(/search): try to search user by username a
[2025-08-27 11:17:08.780] [undefined] GET(/search): successfully found user with username a with status 200
[2025-08-27 11:17:17.717] [undefined] GET(/search): try to search user by username s
[2025-08-27 11:17:17.721] [undefined] GET(/search): successfully found user with username s with status 200
[2025-08-27 11:17:19.006] [undefined] GET(/search): try to search user by username a
[2025-08-27 11:17:19.009] [undefined] GET(/search): successfully found user with username a with status 200
[2025-08-27 11:17:24.678] [undefined] GET(/search): try to search user by username o
[2025-08-27 11:17:24.681] [undefined] GET(/search): successfully found user with username o with status 200
[2025-08-27 11:18:04.771] [undefined] POST(/): try to upload video with status undefined
[2025-08-27 11:18:04.783] [undefined] POST(/): successfully uploaded video with status 200
[2025-08-27 11:18:06.463] [undefined] POST(/thumbnail): try to add thumbnail to video 9
[2025-08-27 11:18:06.478] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-08-27 11:18:06.543] [undefined] PUT(/:id/tags): try to add tags to video 9
[2025-08-27 11:18:06.551] [undefined] PUT(/:id/tags): successfully added tags to video 9 with status 200
[2025-08-27 11:18:10.148] [undefined] POST(/): try to upload video with status undefined
[2025-08-27 11:18:10.158] [undefined] POST(/): successfully uploaded video with status 200
[2025-08-27 11:19:58.791] [undefined] GET(/:id/history): try to retrieve history of user 7
[2025-08-27 11:19:58.800] [undefined] GET(/:id/history): successfully retrieved history of user 7 with status 200
[2025-08-27 11:19:58.813] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:19:58.816] [undefined] GET(/:id/channel): successfully retrieved channel of user 7 with status 200
[2025-08-27 11:19:58.822] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:20:02.093] [undefined] GET(/:id): try to get channel with id 6
[2025-08-27 11:20:02.104] [undefined] GET(/:id): Successfully get channel with id 6 with status 200
[2025-08-27 11:20:02.114] [undefined] GET(/:id/stats): try to get stats
[2025-08-27 11:20:02.124] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-27 11:20:15.775] [undefined] PUT(/:id): try to update channel with id 6
[2025-08-27 11:20:15.791] [undefined] PUT(/:id): Successfully updated channel with status 200
[2025-08-27 11:20:31.838] [undefined] GET(/:id/history): try to retrieve history of user 7
[2025-08-27 11:20:31.846] [undefined] GET(/:id/history): successfully retrieved history of user 7 with status 200
[2025-08-27 11:20:31.857] [undefined] GET(/:id/channel): try to retrieve channel of user 7
[2025-08-27 11:20:31.861] [undefined] GET(/:id/channel): successfully retrieved channel of user 7 with status 200
[2025-08-27 11:20:31.866] [undefined] GET(/user/:id): Playlists retrieved for user with id 7 with status 200
[2025-08-27 11:58:33.079] [undefined] GET(/:id): try to get video 8
[2025-08-27 11:58:33.084] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 11:58:33.093] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 11:58:33.104] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 11:58:33.112] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 11:58:33.126] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 11:58:33.131] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 11:58:41.336] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 11:58:45.011] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-27 11:58:45.016] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-27 11:58:45.028] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 11:58:45.032] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-27 11:58:45.040] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-27 11:58:46.862] [undefined] GET(/:id): try to get channel with id 2
[2025-08-27 11:58:46.867] [undefined] GET(/:id/stats): try to get stats
[2025-08-27 11:58:46.875] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-27 11:58:46.878] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-08-27 11:58:49.962] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 11:58:51.947] [undefined] GET(/:id): try to get video 8
[2025-08-27 11:58:51.952] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-08-27 11:58:51.963] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-08-27 11:58:51.975] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-08-27 11:58:51.986] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-08-27 11:58:52.006] [undefined] GET(/:id/views): try to add views for video 8
[2025-08-27 11:58:52.011] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-08-27 11:58:53.515] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:53.531] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:53.705] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:53.720] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:53.895] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:53.909] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:54.093] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:54.108] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:54.270] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:54.284] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:54.480] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:54.494] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:54.688] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:54.702] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:54.875] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:54.891] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:55.083] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.097] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:55.173] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.179] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:55.375] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.389] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:55.449] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.454] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:55.630] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.645] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:55.737] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.742] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:55.885] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.900] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:55.984] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:55.993] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:56.133] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.148] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:56.233] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.238] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:56.359] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.364] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:56.455] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.459] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:56.636] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.651] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:56.893] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.897] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:56.990] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:56.996] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:57.168] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:57.183] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:57.260] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:57.265] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:57.441] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:57.457] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:57.556] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:57.561] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:57.824] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:57.834] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:57.988] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.002] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:58.095] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.099] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:58.258] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.272] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:58.352] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.357] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:58.487] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.502] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:58.605] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.610] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:58.761] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.777] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:58.875] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:58.881] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:59.003] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.018] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:59.143] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.159] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:59.263] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.268] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:59.370] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.375] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:59.516] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.531] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:59.645] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.662] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:58:59.774] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.789] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:58:59.902] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:58:59.917] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:00.059] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.074] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:00.167] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.172] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:00.323] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.339] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:00.437] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.445] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:00.582] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.598] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:00.688] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:00.694] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:06.632] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:06.648] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:06.789] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:06.806] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:06.912] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:06.917] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:07.077] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.093] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:07.178] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.183] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:07.366] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.381] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:07.468] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.473] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:07.635] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.650] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:07.774] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.788] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:07.920] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:07.935] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:08.047] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.066] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:08.166] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.172] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:08.296] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.312] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:08.434] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.449] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:08.534] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.539] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:08.643] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.648] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:08.751] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.755] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:08.849] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:08.854] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:09.075] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.090] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:09.184] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.190] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:09.278] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.282] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:09.402] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.419] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:09.526] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.544] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:09.640] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.646] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:09.759] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.777] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:09.866] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:09.871] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:10.009] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.024] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:10.135] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.151] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:10.277] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.294] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:10.405] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.419] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:10.512] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.517] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:10.787] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.804] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:10.848] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:10.853] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:11.094] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:11.111] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:11.268] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:11.273] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:11.447] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:11.461] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:12.655] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:12.669] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:12.867] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:12.882] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:12.962] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:12.967] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:13.145] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.159] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:13.217] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.222] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:13.397] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.412] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:13.490] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.495] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:13.680] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.694] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:13.754] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.758] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:13.976] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:13.990] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:14.082] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.089] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:14.248] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.264] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:14.363] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.368] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:14.506] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.522] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:14.618] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.624] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:14.774] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.788] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:14.872] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:14.876] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:15.037] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:15.052] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:16.572] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:16.581] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:16.802] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:16.818] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:17.003] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.017] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:17.137] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.152] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:17.311] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.325] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:17.432] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.448] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:17.609] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.627] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:17.689] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.694] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:17.826] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.840] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:17.934] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:17.939] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:18.126] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:18.141] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:18.216] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:18.221] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:18.579] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:18.594] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:18.930] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:18.946] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:19.201] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:19.216] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:19.456] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:19.472] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:19.627] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:19.642] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:19.885] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:19.900] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:20.337] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:20.356] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:20.863] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:20.870] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:22.737] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:22.753] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:22.861] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:22.876] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:23.082] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:23.099] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:23.240] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:23.256] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:23.361] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:23.380] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:23.594] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:23.609] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:24.714] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:24.720] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:24.932] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:24.946] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:25.134] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:25.149] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:25.328] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:25.342] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:25.608] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:25.625] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:25.767] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:25.782] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:25.889] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:25.904] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:26.026] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:26.032] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:26.174] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:26.194] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:26.450] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:26.467] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:26.707] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:26.723] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:26.917] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:26.921] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:27.101] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.116] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:27.262] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.277] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:27.432] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.447] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:27.588] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.604] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:27.789] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.805] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 11:59:27.982] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:27.997] [undefined] GET(/:id/like): no likes found adding likes for video 8 with status 200
[2025-08-27 11:59:28.142] [undefined] GET(/:id/like): try to toggle like on video 8
[2025-08-27 11:59:28.159] [undefined] GET(/:id/like): likes found, removing like for video 8 with status 200
[2025-08-27 14:02:50.682] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-08-27 14:02:53.508] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-08-27 14:02:53.512] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-08-27 14:02:53.516] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 14:02:53.521] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-08-27 14:02:56.733] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-08-27 14:02:56.738] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-08-27 14:02:56.751] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-08-27 14:02:56.755] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-08-27 14:02:56.761] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200

21
backend/tools.js

@ -17,14 +17,13 @@ async function flushDatabase() {
port: 5432
});
await client.connect();
await client.query('TRUNCATE TABLE users CASCADE', (err, res) => {
if (err) {
console.error('Error flushing database:', err);
} else {
console.log('Database flushed successfully.');
}
});}
try {
await client.connect();
await client.query('TRUNCATE TABLE users CASCADE');
console.log('Database flushed successfully.');
} catch (err) {
console.error('Error flushing database:', err);
} finally {
await client.end();
}
}

63
frontend/src/pages/Subscription.jsx

@ -1,9 +1,24 @@
import React from "react";
import Navbar from "../components/Navbar";
import { useEffect, useState } from "react";
import { getAllUserSubscriptions, getAllUserSubscriptionVideos } from "../services/user.service.js";
import { useAuth } from "../contexts/AuthContext.jsx";
import VideoCard from "../components/VideoCard.jsx";
import { useNavigate } from "react-router-dom";
export default function Subscription() {
const [alerts, setAlerts] = React.useState([]);
const navigate = useNavigate();
const [alerts, setAlerts] = useState([]);
const [subscriptions, setSubscriptions] = React.useState([]);
const [videos, setVideos] = useState([]);
const {user, isAuth} = useAuth();
useEffect(() => {
fetchSubscriptions();
fetchSubscriptionVideos();
}, []);
const fetchSubscriptions = async () => {
const token = localStorage.getItem('token');
@ -12,12 +27,24 @@ export default function Subscription() {
return;
}
const data = await getAllSubscriptions(userId, token, addAlert);
const data = await getAllUserSubscriptions(user.id, token, addAlert);
if (data) {
setSubscriptions(data);
}
};
const fetchSubscriptionVideos = async () => {
const token = localStorage.getItem('token');
if (!token) {
addAlert('error', "User not authenticated");
return;
}
const data = await getAllUserSubscriptionVideos(user.id, token, addAlert);
if (data) {
setVideos(data);
}
};
const addAlert = (type, message) => {
const newAlert = { type, message, id: Date.now() }; // Add unique ID
setAlerts([...alerts, newAlert]);
@ -31,7 +58,37 @@ export default function Subscription() {
<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} />
<main className="px-5 lg:px-36 w-full pt-[48px] lg:pt-[118px]">
<main className="px-5 lg:px-36 w-full pt-[48px] lg:pt-[118px] lg:flex gap-8">
{/* LEFT SIDE (subscription list) */}
<div className="w-full lg:w-1/4 border-b border-gray-200 lg:border-b-0 mb-8 lg:mb-0 pb-2 lg:pb-0">
<h2 className="text-2xl text-white font-montserrat font-semibold mb-4">Mes Abonnements</h2>
<ul className="space-y-2">
{subscriptions.map(subscription => (
<li
key={subscription.id}
className="p-2 flex items-center lg:border-r lg:border-gray-200 glassmorphism w-max lg:w-auto"
onClick={() => navigate(`/channel/${subscription.channel_id}`)}
>
<img
src={subscription.picture}
alt={subscription.channel_name}
className="w-14 aspect-square rounded-full inline-block mr-2 align-middle"
/>
<p className="text-white text-lg font-montserrat font-medium" >{subscription.channel_name}</p>
</li>
))}
</ul>
</div>
{/* RIGHT SIDE (videos from subscriptions) */}
<div className="flex-1 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
{videos.map(video => (
<VideoCard key={video.id} video={video} />
))}
</div>
</main>
</div>
);

48
frontend/src/services/user.service.js

@ -1,5 +1,3 @@
import { getAllSubscriptions } from "../../../backend/app/controllers/user.controller";
export async function isSubscribed(channelId, addAlert) {
const token = localStorage.getItem('token');
if (!token) {
@ -170,4 +168,50 @@ export async function deleteUser(userId, token, addAlert) {
console.error("Error deleting user:", error);
addAlert('error', "Erreur lors de la suppression de l'utilisateur.");
}
}
export async function getAllUserSubscriptions(userId, token ,addAlert) {
if (!userId || !token) {
console.warn("User ID or token missing, skipping subscriptions fetch");
return;
}
try {
const response = await fetch(`/api/users/${userId}/subscriptions`, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
}
});
if (!response.ok) {
throw new Error("Failed to fetch user subscriptions");
}
const data = await response.json();
return data;
} catch (error) {
console.error("Error fetching user subscriptions:", error);
addAlert('error', "Erreur lors de la récupération des abonnements de l'utilisateur.");
}
}
export async function getAllUserSubscriptionVideos(userId, token ,addAlert) {
if (!userId || !token) {
console.warn("User ID or token missing, skipping subscription videos fetch");
return;
}
try {
const response = await fetch(`/api/users/${userId}/subscriptions/videos`, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
}
});
if (!response.ok) {
throw new Error("Failed to fetch user subscription videos");
}
const data = await response.json();
return data;
} catch (error) {
console.error("Error fetching user subscription videos:", error);
addAlert('error', "Erreur lors de la récupération des vidéos des abonnements de l'utilisateur.");
}
}
Loading…
Cancel
Save