Skip to content

Commit

Permalink
correctly setup hooks and methods for User model. Cleanup localstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
paglias committed Jun 6, 2016
1 parent 99a22d1 commit 9d877e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions website/client/js/services/userServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ angular.module('habitrpg')

var save = function () {
localStorage.setItem(STORAGE_SETTINGS_ID, JSON.stringify(settings));
localStorage.removeItem(STORAGE_USER_ID); // TODO remember to remove once it's been live for a few days
};

function callOpsFunctionAndRequest (opName, endPoint, method, paramString, opData) {
Expand Down
3 changes: 3 additions & 0 deletions website/server/models/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import mongoose from 'mongoose';

import schema from './schema';

require('./hooks');
require('./methods');

// A list of publicly accessible fields (not everything from preferences because there are also a lot of settings tha should remain private)
export let publicFields = `preferences.size preferences.hair preferences.skin preferences.shirt
preferences.chair preferences.costume preferences.sleep preferences.background profile stats
Expand Down

0 comments on commit 9d877e3

Please sign in to comment.