1
0
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:
andsandv 2015-02-09 18:28:51 +01:00
parent f35ea4355a
commit 0ad2bde14a
5 changed files with 8 additions and 8 deletions

View File

@ -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) {

View File

@ -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'
}; };

View File

@ -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

View File

@ -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
}); });

View File

@ -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);
}); });