- loadMoreVideos () {
- const observable = this.getVideosObservable(this.pagination.currentPage)
-
- observable.subscribe(
- ({ videos, totalVideos }) => {
- this.pagination.totalItems = totalVideos
- this.videos = this.videos.concat(videos)
+ loadMoreVideos (reset = false) {
+ this.getVideosObservable(this.pagination.currentPage).subscribe(
+ ({ data, total }) => {
+ this.pagination.totalItems = total
+ if (reset) this.videos = []
+ this.videos = this.videos.concat(data)