File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,14 +93,14 @@ public function save($tagData){
9393 if ($ tagData ->getTagId ()){
9494 $ tagModel ->load ((int )$ tagData ->getTagId ());
9595 }
96- $ this -> resource -> save ( $ tagData );
96+ $ tagModel -> setData (( array ) $ tagData );
9797
9898 if ($ products = $ tagData ->getProducts ()) {
9999 $ tagModel ->setPostedProducts ($ products );
100100 }
101101
102102 try {
103- $ this -> resource -> save ( $ tagData );
103+ $ tagModel -> setData (( array ) $ tagData );
104104 } catch (\Exception $ exception ) {
105105 throw new CouldNotSaveException (__ (
106106 'Could not save the tag: %1 ' ,
@@ -157,7 +157,7 @@ public function getList(
157157 public function delete ($ tagId ) {
158158 try {
159159 $ tagModel = $ this ->tagFactory ->create ();
160- // secelt * from table where `tag_id` = $tagId
160+ // select * from table where `tag_id` = $tagId
161161 $ tagModel ->load ($ tagId );
162162 // $tagModel->getCollection()->addFieldToFilter('tag_id',$tagId);
163163 $ tagModel ->delete ();
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<routes xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Webapi:etc/webapi.xsd" >
3- <route method =" GET " url =" /V1/lof-producttags/tags" >
3+ <route method =" POST " url =" /V1/lof-producttags/tags" >
44 <service class =" Lof\ProductTags\Api\TagsManagementInterface" method =" getTags" />
55 <resources >
66 <resource ref =" anonymous" />
1818 <resource ref =" Lof_ProductTags::Tag_add" />
1919 </resources >
2020 </route >
21- <route method =" POST " url =" /V1/lof-producttags/tag/search " >
21+ <route method =" GET " url =" /V1/lof-producttags/tags " >
2222 <service class =" Lof\ProductTags\Api\TagRepositoryInterface" method =" getList" />
2323 <resources >
2424 <resource ref =" Lof_ProductTags::Tag_view" />
You can’t perform that action at this time.
0 commit comments