diff --git a/package.json b/package.json index 8be6f38..3ef6cb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kompasid/web-components", - "version": "v1.8.8", + "version": "v1.8.9", "description": "Kompas.id reusable web components", "main": "dist/index.cjs.js", "module": "dist/custom-elements/index.js", diff --git a/src/components/kompas-paywall-body/kompas-paywall-body.tsx b/src/components/kompas-paywall-body/kompas-paywall-body.tsx index ba10a35..8910b7d 100644 --- a/src/components/kompas-paywall-body/kompas-paywall-body.tsx +++ b/src/components/kompas-paywall-body/kompas-paywall-body.tsx @@ -72,6 +72,7 @@ export class KompasPaywallBody { @State() kompasApigenHost: string = 'https://apigen.kompas.id' @State() kompasApiWcmHost: string = 'https://apiwcm.kompas.id' @State() kompasLoginHost: string = 'https://account.kompas.id/login' + @State() kompasApiSubs: string = 'https://api.kompas.id/subscription/api/v1' @State() selfHost: string = 'https://epaper.kompas.id' @State() swgPublisherName: string = 'Harian Kompas' @State() swgPublisherId: string = 'kompas.id' @@ -309,9 +310,9 @@ export class KompasPaywallBody { }) } private createSwG = async (payload: any, token: string) => { - await fetch(`${this.kompasApiWcmHost}/v2/membership/swg/create`, { + await fetch(`${this.kompasApiSubs}/survey/subscription/membership/swg`, { method: 'POST', - body: JSON.stringify(payload), + body: payload, headers: { 'content-type': 'application/json', 'Authorization': `Bearer ${token}`,