mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
Fixing archive deleting.
This commit is contained in:
parent
fb1f1c6926
commit
3cb2aaf6cf
10 changed files with 202 additions and 111 deletions
|
|
@ -312,11 +312,11 @@ export async function postArchive(url) {
|
|||
return await apiPost(`${API_URI}/archive`, i);
|
||||
}
|
||||
|
||||
export async function deleteArchive(url_id) {
|
||||
return await apiDelete(`${API_URI}/archive/${url_id}`);
|
||||
export async function deleteArchive(archive_id) {
|
||||
return await apiDelete(`${API_URI}/archive/${archive_id}`);
|
||||
}
|
||||
|
||||
export async function searchURLs(offset, limit, domain = null) {
|
||||
export async function searchArchives(offset, limit, domain = null) {
|
||||
// Build a search query to retrieve a list of videos from the API
|
||||
offset = offset || 0;
|
||||
limit = limit || DEFAULT_LIMIT;
|
||||
|
|
@ -328,7 +328,7 @@ export async function searchURLs(offset, limit, domain = null) {
|
|||
let response = await apiPost(`${ARCHIVES_API}/search`, body);
|
||||
if (response.status === 200) {
|
||||
let data = await response.json();
|
||||
return [data['urls'], data['totals']['urls']];
|
||||
return [data['archives'], data['totals']['archives']];
|
||||
} else {
|
||||
throw Error(`Unable to search archives`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue