From d600cdd35970b13fdf4ab756f32d4554afea76d5 Mon Sep 17 00:00:00 2001 From: andsandv Date: Mon, 9 Feb 2015 18:28:51 +0100 Subject: [PATCH] #80 More renaming --- lib/eventDiffer.js | 4 ++-- lib/eventType.js | 4 ++-- lib/featureApi.js | 2 +- lib/featureArchiveApi.js | 2 +- lib/featureDb.js | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/eventDiffer.js b/lib/eventDiffer.js index 6b14292c49..eb2662cb6d 100644 --- a/lib/eventDiffer.js +++ b/lib/eventDiffer.js @@ -9,8 +9,8 @@ var strategyTypes = [ var featureTypes = [ eventType.featureCreated, eventType.featureUpdated, - eventType.featureArchive, - eventType.featureRevive + eventType.featureArchived, + eventType.featureRevived ]; function baseTypeFor(event) { diff --git a/lib/eventType.js b/lib/eventType.js index bda72298fe..dce3b67bbf 100644 --- a/lib/eventType.js +++ b/lib/eventType.js @@ -1,8 +1,8 @@ module.exports = { featureCreated : 'feature-created', featureUpdated : 'feature-updated', - featureArchive : 'feature-archived', - featureRevive : 'feature-revived', + featureArchived : 'feature-archived', + featureRevived : 'feature-revived', strategyCreated: 'strategy-created', strategyDeleted: 'strategy-deleted' }; \ No newline at end of file diff --git a/lib/featureApi.js b/lib/featureApi.js index 1593817699..1be1f84116 100644 --- a/lib/featureApi.js +++ b/lib/featureApi.js @@ -89,7 +89,7 @@ module.exports = function (app) { featureDb.getFeature(featureName) .then(function () { return eventStore.create({ - type: eventType.featureArchive, + type: eventType.featureArchived, createdBy: userName, data: { name: featureName diff --git a/lib/featureArchiveApi.js b/lib/featureArchiveApi.js index 19c12bd09d..a4b8752c41 100644 --- a/lib/featureArchiveApi.js +++ b/lib/featureArchiveApi.js @@ -19,7 +19,7 @@ module.exports = function (app) { validateRequest(req) .then(function() { return eventStore.create({ - type: eventType.featureRevive, + type: eventType.featureRevived, createdBy: req.connection.remoteAddress, data: req.body }); diff --git a/lib/featureDb.js b/lib/featureDb.js index 9baf329c86..c64ae80c1a 100644 --- a/lib/featureDb.js +++ b/lib/featureDb.js @@ -13,11 +13,11 @@ eventStore.on(eventType.featureUpdated, function (event) { return updateFeature(event.data); }); -eventStore.on(eventType.featureArchive, function (event) { +eventStore.on(eventType.featureArchived, function (event) { return archiveFeature(event.data); }); -eventStore.on(eventType.featureRevive, function (event) { +eventStore.on(eventType.featureRevived, function (event) { return reviveFeature(event.data); });