Skip to content

Commit

Permalink
Merge pull request #6 from amir-shadanfar/dev
Browse files Browse the repository at this point in the history
fix some issue in service
  • Loading branch information
amir-shadanfar committed Jul 12, 2021
2 parents 7ad5d47 + ba2204c commit 2639108
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
12 changes: 12 additions & 0 deletions src/Constants/ServiceAclInfoType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Suite\Suite\Constants;

class ServiceAclInfoType
{
use CustomModelTrait;

const BASE_URL = 'base_url';
const ACL_ROLES_URL = 'acl_roles_url';
const ACL_ROLES_METHOD = 'acl_roles_method';
}
3 changes: 0 additions & 3 deletions src/Modules/AbstractModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ public function post(string $url, string $moduleName, array $data)
*/
public function put(string $url, string $moduleName, array $data)
{
$route = path_join($this->url, $id);
$url = path_join($this->baseUrl, $route);

$response = Http::acceptJson()
->withToken($this->getAccessToken())
->put($url, $data);
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function all()
* @return array|mixed
* @throws \Suite\Suite\Exceptions\SuiteException
*/
public function create(string $name, UploadedFile $logo = null, array $infos)
public function create(string $name, array $infos, UploadedFile $logo = null)
{
return parent::post($this->url, $this->moduleName, [
'name' => $name,
Expand Down Expand Up @@ -78,7 +78,7 @@ public function show(int $id)
* @return array|mixed
* @throws \Suite\Suite\Exceptions\SuiteException
*/
public function update(int $id, string $name, UploadedFile $logo = null, array $infos)
public function update(int $id, string $name = '', array $infos = [], UploadedFile $logo = null)
{
return parent::put(path_join($this->url, $id), $this->moduleName, [
'name' => $name,
Expand Down

0 comments on commit 2639108

Please sign in to comment.