mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
Fixing failed api requests.
This commit is contained in:
parent
3673092847
commit
e5b2135cb2
2 changed files with 4 additions and 6 deletions
|
|
@ -111,7 +111,7 @@ export async function deleteChannel(id) {
|
|||
|
||||
export async function getChannels() {
|
||||
let response = await apiGet(`${VIDEOS_API}/channels`);
|
||||
if (response.stack === 200) {
|
||||
if (response.status === 200) {
|
||||
return (await response.json())['channels'];
|
||||
} else {
|
||||
toast({
|
||||
|
|
@ -185,7 +185,7 @@ export async function getDirectories(search_str) {
|
|||
|
||||
export async function getSettings() {
|
||||
let response = await apiGet(`${API_URI}/settings`);
|
||||
if (response === 200) {
|
||||
if (response.status === 200) {
|
||||
return await response.json();
|
||||
} else {
|
||||
toast({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue