Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
add rank attr to inventory model
Browse files Browse the repository at this point in the history
+ clean trailing whitespaces in server/index.js & server/config-example.js
  • Loading branch information
turboMaCk committed Dec 6, 2015
1 parent 0ef6f91 commit fab7e40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/models/inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default AbstractModel.extend(LocationName, {
price: DS.attr('number'),
reorderPoint: DS.attr('number'),
distributionUnit: DS.attr('string'),
rank: DS.attr('string'),

availableLocations: function() {
var locations = this.get('locations').filter(function(location) {
Expand Down
12 changes: 6 additions & 6 deletions server/config-example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var config = {
var config = {
couch_db_server: 'localhost',
couch_db_port: '5984',
couch_db_use_ssl: false,
Expand All @@ -9,17 +9,17 @@ var config = {
google_client_secret: 'FOR GOOGLE SSO; GOOGLE CLIENT SECRET GOES HERE',
server_port: '3000',
server: 'localhost',
use_ssl: false
use_ssl: false
};

config.couch_credentials = function() {
if (config.couch_admin_user && config.couch_admin_password) {
return config.couch_admin_user + ":" + config.couch_admin_password + "@";
} else {
return '';
} else {
return '';
}
};

config.get_protocol = function(is_ssl) {
return "http" + (is_ssl ? 's' : '') + '://';
};
Expand All @@ -32,4 +32,4 @@ if (config.server_port) {
config.couch_db_url = config.get_protocol(config.couch_db_use_ssl) + config.couch_db_server +":"+config.couch_db_port;
config.couch_auth_db_url = config.get_protocol(config.couch_db_use_ssl) + config.couch_credentials() + config.couch_db_server + ":"+config.couch_db_port;
//config.search_url = 'http://localhost:9200'; ELASTIC SEARCH URL (OPTIONAL)
module.exports = config;
module.exports = config;
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ var globSync = require('glob').sync;
var routes = globSync('./routes/**/*.js', { cwd: __dirname }).map(require);

module.exports = function(app) {
routes.forEach(function(route) { route(app); });
routes.forEach(function(route) { route(app); });
};

0 comments on commit fab7e40

Please sign in to comment.