Explorar el Código

fix ombi test button (#1436)

CauseFX hace 4 años
padre
commit
fd3b49c270
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  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)