Fix bad endpoint #9

Merged
astria merged 1 commits from features/responsive into developpement 4 months ago
  1. 84
      backend/logs/access.log
  2. 2
      frontend/src/services/search.service.js

84
backend/logs/access.log

@ -9983,3 +9983,87 @@
[2025-08-26 11:18:05.639] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 11:21:36.442] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 11:21:41.944] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:23:15.531] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:23:34.781] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:27:25.113] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:27:31.837] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:27:31.840] [undefined] GET(/:id/history): try to retrieve history of user 6
[2025-08-26 15:27:31.849] [undefined] GET(/:id/channel): failed to retrieve channel of user 6 because it doesn't exist with status 404
[2025-08-26 15:27:31.853] [undefined] GET(/:id/history): successfully retrieved history of user 6 with status 200
[2025-08-26 15:27:31.860] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:27:38.982] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:27:38.988] [undefined] GET(/:id/channel): failed to retrieve channel of user 6 because it doesn't exist with status 404
[2025-08-26 15:27:38.995] [undefined] GET(/:id/history): try to retrieve history of user 6
[2025-08-26 15:27:39.000] [undefined] GET(/:id/history): successfully retrieved history of user 6 with status 200
[2025-08-26 15:27:39.007] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:27:41.475] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:27:41.479] [undefined] GET(/:id/channel): failed to retrieve channel of user 6 because it doesn't exist with status 404
[2025-08-26 15:27:41.487] [undefined] GET(/:id/history): try to retrieve history of user 6
[2025-08-26 15:27:41.493] [undefined] GET(/:id/history): successfully retrieved history of user 6 with status 200
[2025-08-26 15:27:41.501] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:27:43.170] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:27:43.174] [undefined] GET(/:id/channel): failed to retrieve channel of user 6 because it doesn't exist with status 404
[2025-08-26 15:27:43.182] [undefined] GET(/:id/history): try to retrieve history of user 6
[2025-08-26 15:27:43.190] [undefined] GET(/:id/history): successfully retrieved history of user 6 with status 200
[2025-08-26 15:27:43.199] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:28:18.239] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:28:18.243] [undefined] GET(/:id/history): try to retrieve history of user 6
[2025-08-26 15:28:18.251] [undefined] GET(/:id/channel): failed to retrieve channel of user 6 because it doesn't exist with status 404
[2025-08-26 15:28:18.255] [undefined] GET(/:id/history): successfully retrieved history of user 6 with status 200
[2025-08-26 15:28:18.260] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:28:29.304] [undefined] POST(/): try to create new channel with owner 6 and name Lol
[2025-08-26 15:28:29.310] [undefined] POST(/): Successfully created new channel with name Lol with status 200
[2025-08-26 15:28:29.331] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:28:29.338] [undefined] GET(/:id/channel): successfully retrieved channel of user 6 with status 200
[2025-08-26 15:28:31.216] [undefined] GET(/:id): try to get channel with id 3
[2025-08-26 15:28:31.229] [undefined] GET(/:id/stats): try to get stats
[2025-08-26 15:28:31.233] [undefined] GET(/:id): Successfully get channel with id 3 with status 200
[2025-08-26 15:28:31.241] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-26 15:28:42.096] [undefined] PUT(/:id): try to update channel with id 3
[2025-08-26 15:28:42.103] [undefined] PUT(/:id): Successfully updated channel with status 200
[2025-08-26 15:28:44.775] [undefined] GET(/:id): try to get channel with id 3
[2025-08-26 15:28:44.785] [undefined] GET(/:id/stats): try to get stats
[2025-08-26 15:28:44.793] [undefined] GET(/:id): Successfully get channel with id 3 with status 200
[2025-08-26 15:28:44.800] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-26 15:28:48.079] [undefined] GET(/:id/channel): try to retrieve channel of user 6
[2025-08-26 15:28:48.084] [undefined] GET(/:id/channel): successfully retrieved channel of user 6 with status 200
[2025-08-26 15:29:35.594] [undefined] POST(/): try to upload video with status undefined
[2025-08-26 15:29:35.608] [undefined] POST(/): successfully uploaded video with status 200
[2025-08-26 15:29:35.848] [undefined] POST(/thumbnail): try to add thumbnail to video 5
[2025-08-26 15:29:35.852] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-08-26 15:29:35.888] [undefined] PUT(/:id/tags): try to add tags to video 5
[2025-08-26 15:29:35.898] [undefined] PUT(/:id/tags): successfully added tags to video 5 with status 200
[2025-08-26 15:29:39.128] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:29:57.760] [undefined] GET(/:id): try to get video 5
[2025-08-26 15:29:57.763] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:29:57.779] [undefined] GET(/:id): successfully get video 5 with status 200
[2025-08-26 15:29:57.803] [undefined] GET(/:id/similar): try to get similar videos for video 5
[2025-08-26 15:29:57.814] [undefined] GET(/:id/similar): successfully get similar videos for video 5 with status 200
[2025-08-26 15:29:57.856] [undefined] GET(/:id/views): try to add views for video 5
[2025-08-26 15:29:57.874] [undefined] GET(/:id/views): successfully added views for video 5 with status 200
[2025-08-26 15:30:01.024] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 3
[2025-08-26 15:30:01.046] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-26 15:30:03.756] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:33:13.660] [undefined] GET(/:id): try to get video 5
[2025-08-26 15:33:13.664] [undefined] GET(/user/:id): Playlists retrieved for user with id 6 with status 200
[2025-08-26 15:33:13.679] [undefined] GET(/:id): successfully get video 5 with status 200
[2025-08-26 15:33:13.701] [undefined] GET(/:id/similar): try to get similar videos for video 5
[2025-08-26 15:33:13.714] [undefined] GET(/:id/similar): successfully get similar videos for video 5 with status 200
[2025-08-26 15:33:13.793] [undefined] GET(/:id/views): try to add views for video 5
[2025-08-26 15:33:13.803] [undefined] GET(/:id/views): successfully added views for video 5 with status 200
[2025-08-26 15:33:44.021] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200
[2025-08-26 15:34:58.333] [undefined] GET(/:id/stats): failed due to invalid values with status 400
[2025-08-26 15:34:58.339] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-26 15:35:06.306] [undefined] GET(/:id/stats): failed due to invalid values with status 400
[2025-08-26 15:35:06.316] [undefined] GET(/:id): failed due to invalid values with status 400
[2025-08-26 15:35:53.954] [undefined] GET(/:id): try to get channel with id 1
[2025-08-26 15:35:53.973] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-26 15:35:54.017] [undefined] GET(/:id/channel/subscribed): check if user 6 is subscribed to channel 1
[2025-08-26 15:35:54.023] [undefined] GET(/:id/channel/subscribed): user 6 is not subscribed to channel 1 with status 200
[2025-08-26 15:36:02.097] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-26 15:36:02.108] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-26 15:36:06.090] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-26 15:36:06.108] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-26 15:36:07.000] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-26 15:36:07.027] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-26 15:36:13.655] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 6 with status 200

2
frontend/src/services/search.service.js

@ -1,5 +1,5 @@
export function search(query, filter, offset, limit, addAlert) {
return fetch(`https://localhost/api/search?q=${encodeURIComponent(query)}&type=${filter}&offset=${offset}&limit=${limit}`, {
return fetch(`/api/search?q=${encodeURIComponent(query)}&type=${filter}&offset=${offset}&limit=${limit}`, {
method: 'GET',
credentials: 'include',
headers: {

Loading…
Cancel
Save