UNPKG

ridecabrider

Version:

RideCab Customer Ride Booking All Over Cyprus, Live Driver Tracking, Wallet, Payment Methods

30 lines (26 loc) 1.04 kB
import languageJSON from './language'; export function RequestPushMsg(token,msg,bookingId){ fetch('https://exp.host/--/api/v2/push/send', { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'accept-encoding': 'gzip, deflate', 'host': 'exp.host' }, body: JSON.stringify({ "to": token, "title": languageJSON.notification_title, "body": msg, "data": {"msg":msg,"title":languageJSON.notification_title}, "priority": "high", "sound":"default", "channelId": "messages", "_displayInForeground": true }), }).then((response) => response.json()) .then((responseJson) => { return responseJson }) .catch((error) => { console.log(error) }); }