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
2020-02-20 08:30:33 +01:00

27 lines
448 B
JavaScript

'use strict';
const reqwest = require('reqwest');
const TYPE = 'json';
const EventStore = {
getEvents () {
return reqwest({
url: 'events',
method: 'get',
type: TYPE,
});
},
getEventsByName (eventName) {
return reqwest({
url: `events/${eventName}`,
method: 'get',
type: TYPE,
});
},
};
module.exports = EventStore;