2018-10-25 16:50:16 +02:00
|
|
|
/*
|
|
|
|
* decaffeinate suggestions:
|
|
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
|
|
*/
|
|
|
|
'use strict';
|
2015-05-05 03:10:25 +02:00
|
|
|
|
2018-10-25 16:50:16 +02:00
|
|
|
Application.Services.factory('Notification', ["$resource", $resource=>
|
|
|
|
$resource("/api/notifications/:id",
|
|
|
|
{id: "@id"}, {
|
|
|
|
query: {
|
2017-01-05 15:06:54 +01:00
|
|
|
isArray: false
|
2018-10-25 16:50:16 +02:00
|
|
|
},
|
|
|
|
update: {
|
2015-05-05 03:10:25 +02:00
|
|
|
method: 'PUT'
|
2018-10-25 16:50:16 +02:00
|
|
|
},
|
|
|
|
polling: {
|
|
|
|
url: '/api/notifications/polling',
|
2017-01-05 15:06:54 +01:00
|
|
|
method: 'GET'
|
2018-10-25 16:50:16 +02:00
|
|
|
},
|
|
|
|
last_unread: {
|
|
|
|
url: '/api/notifications/last_unread',
|
2017-01-05 15:06:54 +01:00
|
|
|
method: 'GET'
|
2018-10-25 16:50:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
]);
|