+ Add unit test case for gitlab->getApiRoot.

This commit is contained in:
caoyanyi
2024-01-03 13:13:56 +08:00
parent 68b88088e1
commit 237115033c
2 changed files with 38 additions and 1 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ class gitlabModel extends model
public function getApiRoot(int $gitlabID, bool $sudo = true): string
{
$gitlab = $this->getByID($gitlabID);
if(!$gitlab) return '';
if(!$gitlab || $gitlab->type != 'gitlab') return '';
$sudoParam = '';
if($sudo == true && !$this->app->user->admin)