Return address record when saving an address instead of true or false #2508
-
Hi, we have a custom controller which provides an action to save various user data, e.g. user first name, last name, and address data. We are returning JSON Data with the updated or created user data. We are using Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
All save methods in Craft and Craft Commerce services return true and false only at the moment. What would you like returned? You still have reference to the address model that you passed to |
Beta Was this translation helpful? Give feedback.
All save methods in Craft and Craft Commerce services return true and false only at the moment.
What would you like returned? You still have reference to the address model that you passed to
saveAddress($address)
and if it was saved, it will have the new record ID added to it.