Skip to content

Commit

Permalink
add popular for tracks, fix search error
Browse files Browse the repository at this point in the history
  • Loading branch information
damedelion committed Dec 17, 2024
1 parent 761a11e commit 0d29b48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pages/search/ui/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class SearchPage {
}

const errorView = new ErrorView(
null,
this.pageContent,
"Ничего не найдено",
"Попробуйте поискать что-то другое.",
);
Expand Down
8 changes: 4 additions & 4 deletions src/shared/config/api.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// export const BASE_URL = "http://localhost:8080";

/* export const API_USER_URL = "http://localhost:8080";
export const API_USER_URL = "http://localhost:8080";
export const API_ALBUM_URL = "http://localhost:8080";
export const API_ARTIST_URL = "http://localhost:8080";
export const API_PLAYLIST_URL = "http://localhost:8080";
export const API_TRACK_URL = "http://localhost:8080";
export const API_GENRE_URL = "http://localhost:8080";
export const API_CSAT_URL = "http://localhost:8080";
export const S3_URL = "http://localhost:8010"; */
export const S3_URL = "http://localhost:8010";

export const BASE_URL = "https://nova-music.ru";

export const API_USER_URL = "https://nova-music.ru";
/* export const API_USER_URL = "https://nova-music.ru";
export const API_ALBUM_URL = "https://nova-music.ru";
export const API_ARTIST_URL = "https://nova-music.ru:";
export const API_PLAYLIST_URL = "https://nova-music.ru";
export const API_TRACK_URL = "https://nova-music.ru";
export const API_GENRE_URL = "https://nova-music.ru";
export const API_CSAT_URL = "https://nova-music.ru";
export const S3_URL = "https://nova-music.ru:8010";
export const S3_URL = "https://nova-music.ru:8010"; */
1 change: 1 addition & 0 deletions src/shared/lib/constants/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const API_ENDPOINTS = {

GET_ALL_TRACKS: `${API_TRACK_URL}/api/v1/tracks`,
GET_FAVORITE_TRACKS: `${API_TRACK_URL}/api/v1/tracks/favorite`,
GET_POPULAR_TRACKS: `${API_TRACK_URL}/api/v1/tracks/popular`,
GET_TRACKS_BY_PLAYLIST: (playlistID) =>
`${API_TRACK_URL}/api/v1/tracks/byPlaylistId/${playlistID}`,
GET_TRACKS_BY_ALBUM: (albumID) =>
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/trackList/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TrackListAPI {
} else if (args.playlistId !== undefined) {
this.url = API_ENDPOINTS.GET_TRACKS_BY_PLAYLIST(args.playlistId);
} else {
this.url = API_ENDPOINTS.GET_ALL_TRACKS;
this.url = API_ENDPOINTS.GET_POPULAR_TRACKS;
}
}

Expand Down

0 comments on commit 0d29b48

Please sign in to comment.