mirror of
https://gitlab.com/foxixus/neomovies.git
synced 2025-10-29 10:28:49 +05:00
Release 2.3
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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 });
|
||||
},
|
||||
|
||||
// Удалить из избранного
|
||||
|
||||
Reference in New Issue
Block a user