Skip to content

Commit

Permalink
Further renaming for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
austencollins committed Aug 6, 2015
1 parent ddb3973 commit b9dbf6e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/models/model_user.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// Dependencies
var Config = require('../config/config');
var Utilities = require('../utilities/utilities');
var AppDynamoDB = require('./model_aws').DynamoDB;
AppDynamoDB = new AppDynamoDB();
var ModelDynamoDB = require('./model_aws').DynamoDB;
ModelDynamoDB = new ModelDynamoDB();

var moment = require('moment');
var bcryptjs = require('bcryptjs');
Expand Down Expand Up @@ -231,10 +231,10 @@ User.prototype.showByEmail = function(email, callback) {
params.TableName = dynamodb_table;
params.IndexName = "email-index";
params.KeyConditions = [
AppDynamoDB.Condition("email", "EQ", email)
ModelDynamoDB.Condition("email", "EQ", email)
];

AppDynamoDB.query(params, function(error, response) {
ModelDynamoDB.query(params, function(error, response) {

if (error || !response) return callback({
status: 500,
Expand Down Expand Up @@ -278,10 +278,10 @@ User.prototype.showByID = function(user_id, callback) {
var params = {};
params.TableName = dynamodb_table;
params.KeyConditions = [
AppDynamoDB.Condition("_id", "EQ", user_id)
ModelDynamoDB.Condition("_id", "EQ", user_id)
];

AppDynamoDB.query(params, function(error, response) {
ModelDynamoDB.query(params, function(error, response) {

if (error || !response) return callback({
status: 500,
Expand Down Expand Up @@ -382,7 +382,7 @@ User.prototype.save = function(user, callback) {
if (params.UpdateExpression[params.UpdateExpression.length - 1] === ',') params.UpdateExpression = params.UpdateExpression.substring(0, params.UpdateExpression.length - 1);


AppDynamoDB.updateItem(params, function(error, response) {
ModelDynamoDB.updateItem(params, function(error, response) {

if (error || !response) return callback({
status: 500,
Expand Down

0 comments on commit b9dbf6e

Please sign in to comment.