Release 2.3

This commit is contained in:
2025-07-08 13:41:04 +03:00
parent c8988b4979
commit bf3e231f67
15 changed files with 160 additions and 300 deletions

View File

@@ -8,7 +8,7 @@ export const authAPI = {
return api.post('/auth/resend-code', { email });
},
verify(email: string, code: string) {
return api.put('/auth/verify', { email, code });
return api.post('/auth/verify', { email, code });
},
login(email: string, password: string) {
return api.post('/auth/login', { email, password });

View File

@@ -9,7 +9,8 @@ export const favoritesAPI = {
// Добавить в избранное
addFavorite(data: { mediaId: string; mediaType: 'movie' | 'tv', title: string, posterPath: string }) {
return api.post(`/favorites`, data);
const { mediaId, mediaType, title, posterPath } = data;
return api.post(`/favorites/${mediaId}?mediaType=${mediaType}`, { title, posterPath });
},
// Удалить из избранного