mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
#80 More renaming
This commit is contained in:
parent
f35ea4355a
commit
0ad2bde14a
@ -9,8 +9,8 @@ var strategyTypes = [
|
||||
var featureTypes = [
|
||||
eventType.featureCreated,
|
||||
eventType.featureUpdated,
|
||||
eventType.featureArchive,
|
||||
eventType.featureRevive
|
||||
eventType.featureArchived,
|
||||
eventType.featureRevived
|
||||
];
|
||||
|
||||
function baseTypeFor(event) {
|
||||
|
@ -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'
|
||||
};
|
@ -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
|
||||
|
@ -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
|
||||
});
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user