Chore: Send browser language in webwidget events (#952)

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Sojan Jose
2020-06-13 00:19:43 +05:30
committed by GitHub
parent ed1c871633
commit f9e8bb8e10
10 changed files with 47 additions and 30 deletions

View File

@@ -1,7 +1,9 @@
import { API } from 'widget/helpers/axios';
import { buildSearchParamsWithLocale } from '../helpers/urlParamsHelper';
export default {
create(name) {
return API.post(`/api/v1/widget/events${window.location.search}`, { name });
const search = buildSearchParamsWithLocale(window.location.search);
return API.post(`/api/v1/widget/events${search}`, { name });
},
};