CauseFX 4 лет назад
Родитель
Сommit
fd3b49c270
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      api/homepage/ombi.php

+ 4 - 2
api/homepage/ombi.php

@@ -75,13 +75,15 @@ trait OmbiHomepageItem
 			if ($test->success) {
 				$this->setAPIResponse('success', 'API Connection succeeded', 200);
 				return true;
+			} else {
+				$this->setResponse(401, $test->body);
+				return false;
 			}
-			
 		} catch (Requests_Exception $e) {
 			$this->writeLog('error', 'OMBI Connect Function - Error: ' . $e->getMessage(), 'SYSTEM');
 			$this->setAPIResponse('error', $e->getMessage(), 500);
 			return false;
-		};
+		}
 	}
 	
 	public function ombiHomepagePermissions($key = null)