File: //home/arjun/projects/buyercall/buyercall/assets/vue/service/notificationService.js
import BuyerGatewayMock from '../gateway/mockGateway';
import Gateway from '../gateway/gateway';
const getUserNotifications = (limit, offset) =>
Gateway.get(
`/notifications/get-all-unviewed/?limit=${limit}&offset=${offset}`,
);
const getUnviewiedCount = () =>
Gateway.get('/notifications/get-unviewed-count');
const updateIsViewedFlag = notificationIds =>
Gateway.post('/notifications/update-viewed', {
notificationIds: notificationIds,
});
const getUserNotificationStatus = () =>
Gateway.get('/notifications/get-status');
const updateUserNotificationStatus = postdata =>
Gateway.post('/notifications/update-status', {
isSubscribed: postdata,
});
const updateIsReadFlag = notificationIds =>
Gateway.post('notifications/update-read', {
notificationIds: notificationIds,
});
const logNotifications = (user_id, notify_type) => {
return Gateway.post('/notification/log', {
user_id,
notify_type,
});
};
export default {
getUserNotifications,
getUnviewiedCount,
updateIsViewedFlag,
getUserNotificationStatus,
updateUserNotificationStatus,
updateIsReadFlag,
logNotifications,
};