1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/packages/unleash-frontend/public/js/stores/EventStore.js

26 lines
432 B
JavaScript
Raw Normal View History

2016-06-18 21:53:18 +02:00
'use strict';
const reqwest = require('reqwest');
2014-11-13 15:14:41 +01:00
2016-06-18 21:53:18 +02:00
const TYPE = 'json';
2014-11-13 15:14:41 +01:00
2016-06-18 21:53:18 +02:00
const EventStore = {
getEvents() {
2014-11-13 15:14:41 +01:00
return reqwest({
url: 'events',
method: 'get',
type: TYPE
});
2014-11-17 11:15:10 +01:00
},
2016-06-18 21:53:18 +02:00
getEventsByName(name) {
2014-11-17 11:15:10 +01:00
return reqwest({
2016-06-18 21:53:18 +02:00
url: `events/${name}`,
2014-11-17 11:15:10 +01:00
method: 'get',
type: TYPE
});
2014-11-13 15:14:41 +01:00
}
2014-11-17 11:15:10 +01:00
2014-11-13 15:14:41 +01:00
};
module.exports = EventStore;