mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
27 lines
561 B
JavaScript
27 lines
561 B
JavaScript
|
var reqwest = require('reqwest');
|
||
|
|
||
|
TYPE = 'json';
|
||
|
CONTENT_TYPE = 'application/json';
|
||
|
|
||
|
var StrategyStore = {
|
||
|
createStrategy: function (strategy) {
|
||
|
return reqwest({
|
||
|
url: 'strategies',
|
||
|
method: 'post',
|
||
|
type: TYPE,
|
||
|
contentType: CONTENT_TYPE,
|
||
|
data: JSON.stringify(strategy)
|
||
|
});
|
||
|
},
|
||
|
|
||
|
getStrategies: function () {
|
||
|
return reqwest({
|
||
|
url: 'strategies',
|
||
|
method: 'get',
|
||
|
type: TYPE
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = StrategyStore;
|