File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
apps/Core/Components/Appstypes
system/Base/Providers/AppsServiceProvider Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public function updateAction()
7272 return ;
7373 }
7474
75- $ this ->appsTypes ->updateAppsType ($ this ->postData ());
75+ $ this ->appsTypes ->updateAppType ($ this ->postData ());
7676
7777 $ this ->addResponse (
7878 $ this ->apps ->packagesData ->responseMessage ,
Original file line number Diff line number Diff line change @@ -47,12 +47,19 @@ public function getAppTypeByType($app_type)
4747 * notification_allowed_methods(email, sms)//Example
4848 * @notification_allowed_methods(email, sms)
4949 */
50- public function updateAppsType (array $ data )
50+ public function updateAppType (array $ data )
5151 {
5252 $ appType = $ this ->getAppTypeById ($ data ['id ' ]);
5353
54- $ appType ['name ' ] = $ data ['name ' ];
55- $ appType ['description ' ] = $ data ['description ' ];
54+ if (isset ($ data ['name ' ])) {
55+ $ appType ['name ' ] = $ data ['name ' ];
56+ }
57+ if (isset ($ data ['description ' ])) {
58+ $ appType ['description ' ] = $ data ['description ' ];
59+ }
60+ if (isset ($ data ['version ' ])) {
61+ $ appType ['version ' ] = $ data ['version ' ];
62+ }
5663
5764 if ($ this ->update ($ appType )) {
5865 $ this ->addResponse ('Updated ' . $ appType ['name ' ] . ' app type ' );
@@ -61,7 +68,7 @@ public function updateAppsType(array $data)
6168 }
6269 }
6370
64- public function removeAppsType (array $ data )
71+ public function removeAppType (array $ data )
6572 {
6673 $ appType = $ this ->getAppTypeById ($ data ['id ' ]);
6774
You can’t perform that action at this time.
0 commit comments