Fixing failed api requests.

This commit is contained in:
Roland 2022-05-01 21:12:39 -06:00
parent 3673092847
commit e5b2135cb2
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 4 additions and 6 deletions

View file

@ -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({