From 0b15ea51bda79b138b1741a7b205cd29f8f2e2f2 Mon Sep 17 00:00:00 2001 From: afornerot Date: Fri, 12 Apr 2024 22:31:02 +0200 Subject: [PATCH] return block --- src/Service/giteaService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/giteaService.php b/src/Service/giteaService.php index b2a162c..975be1f 100644 --- a/src/Service/giteaService.php +++ b/src/Service/giteaService.php @@ -337,7 +337,7 @@ class giteaService $body = \Unirest\Request\Body::json($query); $body=str_replace('"'.$toblock.'"',$toblock,$body); $response=$this->api("POST",$apiurl,$body,$this->session->get("giteatoken")); - if(!$response||$response->code!="200") return false; + if(!$response||($response->code!="200"&&$response->code!="201")) return false; else return $response->body; }