mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
#80 More renaming
This commit is contained in:
parent
f35ea4355a
commit
0ad2bde14a
@ -9,8 +9,8 @@ var strategyTypes = [
|
|||||||
var featureTypes = [
|
var featureTypes = [
|
||||||
eventType.featureCreated,
|
eventType.featureCreated,
|
||||||
eventType.featureUpdated,
|
eventType.featureUpdated,
|
||||||
eventType.featureArchive,
|
eventType.featureArchived,
|
||||||
eventType.featureRevive
|
eventType.featureRevived
|
||||||
];
|
];
|
||||||
|
|
||||||
function baseTypeFor(event) {
|
function baseTypeFor(event) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
featureCreated : 'feature-created',
|
featureCreated : 'feature-created',
|
||||||
featureUpdated : 'feature-updated',
|
featureUpdated : 'feature-updated',
|
||||||
featureArchive : 'feature-archived',
|
featureArchived : 'feature-archived',
|
||||||
featureRevive : 'feature-revived',
|
featureRevived : 'feature-revived',
|
||||||
strategyCreated: 'strategy-created',
|
strategyCreated: 'strategy-created',
|
||||||
strategyDeleted: 'strategy-deleted'
|
strategyDeleted: 'strategy-deleted'
|
||||||
};
|
};
|
@ -89,7 +89,7 @@ module.exports = function (app) {
|
|||||||
featureDb.getFeature(featureName)
|
featureDb.getFeature(featureName)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return eventStore.create({
|
return eventStore.create({
|
||||||
type: eventType.featureArchive,
|
type: eventType.featureArchived,
|
||||||
createdBy: userName,
|
createdBy: userName,
|
||||||
data: {
|
data: {
|
||||||
name: featureName
|
name: featureName
|
||||||
|
@ -19,7 +19,7 @@ module.exports = function (app) {
|
|||||||
validateRequest(req)
|
validateRequest(req)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return eventStore.create({
|
return eventStore.create({
|
||||||
type: eventType.featureRevive,
|
type: eventType.featureRevived,
|
||||||
createdBy: req.connection.remoteAddress,
|
createdBy: req.connection.remoteAddress,
|
||||||
data: req.body
|
data: req.body
|
||||||
});
|
});
|
||||||
|
@ -13,11 +13,11 @@ eventStore.on(eventType.featureUpdated, function (event) {
|
|||||||
return updateFeature(event.data);
|
return updateFeature(event.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
eventStore.on(eventType.featureArchive, function (event) {
|
eventStore.on(eventType.featureArchived, function (event) {
|
||||||
return archiveFeature(event.data);
|
return archiveFeature(event.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
eventStore.on(eventType.featureRevive, function (event) {
|
eventStore.on(eventType.featureRevived, function (event) {
|
||||||
return reviveFeature(event.data);
|
return reviveFeature(event.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user