2017-07-25 14:24:40 +00:00
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
export async function readNotification (store, payload) {
|
2018-01-31 10:55:39 +00:00
|
|
|
let url = `/api/v3/notifications/${payload.notificationId}/read`;
|
2017-07-25 14:24:40 +00:00
|
|
|
let response = await axios.post(url);
|
|
|
|
|
return response.data.data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function readNotifications (store, payload) {
|
2018-01-31 10:55:39 +00:00
|
|
|
let url = '/api/v3/notifications/read';
|
|
|
|
|
let response = await axios.post(url, {
|
|
|
|
|
notificationIds: payload.notificationIds,
|
|
|
|
|
});
|
|
|
|
|
return response.data.data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function seeNotification (store, payload) {
|
|
|
|
|
let url = `/api/v3/notifications/${payload.notificationId}/see`;
|
|
|
|
|
let response = await axios.post(url);
|
|
|
|
|
return response.data.data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function seeNotifications (store, payload) {
|
|
|
|
|
let url = '/api/v3/notifications/see';
|
2017-07-25 14:24:40 +00:00
|
|
|
let response = await axios.post(url, {
|
|
|
|
|
notificationIds: payload.notificationIds,
|
|
|
|
|
});
|
|
|
|
|
return response.data.data;
|
|
|
|
|
}
|