Handle unauthorized case in backend
This commit is contained in:
1 parent
1120d40085
commit
21a10705f1
1 file changed
+27
+27
@@ -80,6 +80,15 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if IsAssociativeArray(feeds)
|
||||||
|
if feeds.error <> invalid
|
||||||
|
response.Json(feeds)
|
||||||
|
response.http_code = 500
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
"videos": []
|
"videos": []
|
||||||
}
|
}
|
||||||
@@ -144,6 +153,15 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if IsAssociativeArray(feeds)
|
||||||
|
if feeds.error <> invalid
|
||||||
|
response.Json(feeds)
|
||||||
|
response.http_code = 500
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
if feeds.Count() > 0
|
if feeds.Count() > 0
|
||||||
response.Json(feeds[0])
|
response.Json(feeds[0])
|
||||||
return true
|
return true
|
||||||
@@ -186,6 +204,15 @@ namespace Http
|
|||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if IsAssociativeArray(feeds)
|
||||||
|
if feeds.error <> invalid
|
||||||
|
response.Json(feeds)
|
||||||
|
response.http_code = 500
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
if feeds.Count() > 0
|
if feeds.Count() > 0
|
||||||
response.Json(feeds[0])
|
response.Json(feeds[0])
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in new issue
Block a user