Permalink
Browse files

Implemented review comments

  • Loading branch information...
allanmc committed Mar 28, 2015
1 parent 4c03355 commit 19ece3cce5a3de3e210407bbc4ab3fab5e919792
Showing with 5 additions and 7 deletions.
  1. +2 −4 config/default.json
  2. +1 −1 lib/styleset-utils.js
  3. +2 −2 scripts/fix-styleset-access.js
View
@@ -37,9 +37,6 @@
"prices": {
"styleset": {"name": "Premium Styleset", "price": "5.99"}
},
- "free":{
- "stylesets": ["book-bw", "book-color", "future-bw", "future-color", "light-bw", "light-color", "simple-bw", "simple-color"]
- },
"passport": {
"twitter": {
"consumerKey": "xxx",
@@ -70,7 +67,8 @@
},
"subscriptions": {
"free": {
- "storage": 20000//bytes
+ "storage": 20000,//bytes
+ "stylesets": ["book-bw", "book-color", "future-bw", "future-color", "light-bw", "light-color", "simple-bw", "simple-color"]
},
"premium": {
"storage": 20000000//bytes
View
@@ -282,7 +282,7 @@ function createSystemStyleset(stylesheetName, order, next) {
});
// Define the free stylesets
- if (conf.free.stylesets.indexOf(stylesheetName) >= 0) {
+ if (conf.subscriptions.free.stylesets.indexOf(stylesheetName) >= 0) {
styleset.accessLevels = ["free", "premium", "professional"];
}
@@ -4,13 +4,13 @@ var conf = require('config');
mongoose.connect(conf.db.uri);
-Styleset.update({"name": {"$nin": conf.free.stylesets} }, {"$set": {"accessLevels": ['premium', 'professional']}}, {multi: true}, function(err, numAffected) {
+Styleset.update({"name": {"$nin": conf.subscriptions.free.stylesets} }, {"$set": {"accessLevels": ['premium', 'professional']}}, {multi: true}, function(err, numAffected) {
if (err) {
cosole.log(err);
return process.exit(1);
}
console.log("Updated " + numAffected + " stylesets to premium.");
- Styleset.update({"name": {"$in": conf.free.stylesets} }, {"$set": {"accessLevels": ['free', 'premium', 'professional']}}, {multi: true}, function(err, numAffected) {
+ Styleset.update({"name": {"$in": conf.subscriptions.free.stylesets} }, {"$set": {"accessLevels": ['free', 'premium', 'professional']}}, {multi: true}, function(err, numAffected) {
if (err) {
cosole.log(err);
return process.exit(1);

0 comments on commit 19ece3c

Please sign in to comment.