Skip to content

Commit

Permalink
Updated .env.example and changed oauth to look for user handle
Browse files Browse the repository at this point in the history
  • Loading branch information
luvuong-le committed Sep 27, 2019
1 parent e9e0cf8 commit 86efe50
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion client/components/room/RoomList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ export default {
return this.rooms.filter(room => room.access === true);
},
filteredRooms() {
console.log(this.rooms);
if (this.searchInput.toLowerCase() === 'my_rooms') {
return this.rooms.filter(room => room.user._id === this.getUserData._id);
} else {
Expand Down
2 changes: 1 addition & 1 deletion server/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NODE_ENV=development
HEROKU=false
HEROKU_DEPLOYMENT=false

DATABASE_URL=DATABASE_URL

Expand Down
4 changes: 2 additions & 2 deletions server/config/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function(passport) {
profile,
done
) {
User.findOne({ username: profile.displayName })
User.findOne({ handle: slugify(profile.displayName.toLowerCase()) })
.then(user => {
if (user) {
user.social.id = profile.id;
Expand Down Expand Up @@ -91,7 +91,7 @@ module.exports = function(passport) {
profile,
done
) {
User.findOne({ username: profile.displayName })
User.findOne({ handle: slugify(profile.displayName.toLowerCase()) })
.then(user => {
if (user) {
user.social.id = profile.id;
Expand Down
2 changes: 1 addition & 1 deletion server/db/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mongoose.Promise = global.Promise;
const connect = () => {
mongoose.connect(
process.env.DATABASE_URL,
{ useNewUrlParser: true, useCreateIndex: true },
{ useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true },
err => {
if (err) {
logger.error(err);
Expand Down

0 comments on commit 86efe50

Please sign in to comment.