Feature: Website SDK (#653)

Add SDK functions

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-04-03 13:04:58 +05:30
committed by GitHub
co-authored by Sojan
parent 7fcd2d0e85
commit cb22b396eb
38 changed files with 734 additions and 262 deletions
+12
View File
@@ -0,0 +1,12 @@
import { API } from 'widget/helpers/axios';
const buildUrl = endPoint => `/api/v1/${endPoint}${window.location.search}`;
export default {
update(identifier, userObject) {
return API.patch(buildUrl('widget/contact'), {
identifier,
...userObject,
});
},
};