mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 11:26:25 -05:00
Fixing failed api requests.
This commit is contained in:
parent
3673092847
commit
e5b2135cb2
2 changed files with 4 additions and 6 deletions
|
|
@ -306,15 +306,13 @@ class Videos extends React.Component {
|
|||
// Pass any enabled filters to the search.
|
||||
let filtersArr = this.enabledFilters();
|
||||
|
||||
let videos = [];
|
||||
let total = 0;
|
||||
try {
|
||||
let [videos, total] = await searchVideos(offset, limit, channel_id, queryStr, searchOrder, filtersArr);
|
||||
let totalPages = Math.round(total / this.state.limit) || 1;
|
||||
this.setState({videos, totalPages});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
let totalPages = Math.round(total / this.state.limit) || 1;
|
||||
this.setState({videos, totalPages});
|
||||
}
|
||||
|
||||
changePage = async (activePage) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue