Skip to content

Commit

Permalink
fix send notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
andela-eefekemo committed Jun 16, 2017
1 parent dbf9c0a commit 2ed1a94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const index = require('../app/controllers/index');
const mail = require('../app/controllers/mail');
const { gameData } = require('../app/controllers/gameData');
const logs = require('./logs');
const friends = require('../app/controllers/friends');

module.exports = (app, passport, auth) => {
// region Route
Expand Down Expand Up @@ -146,4 +147,11 @@ module.exports = (app, passport, auth) => {
app.get('/api/leaderboard', logs.getLeaderBoard);
app.get('/api/games/history', logs.getHistory);
app.get('/api/donations', logs.getDonations);
app.post('/addNotification', friends.addNotification);
app.get('/notification/:id', friends.getNotification);
app.delete('/notification/:id', friends.deleteNotification);
// Friends route
app.post('/friend', friends.addFriend);
app.get('/friend/:id', friends.getFriend);
app.delete('/friend/:id', friends.deleteFriend);
};
2 changes: 2 additions & 0 deletions config/socket/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const Friend = require('../../app/controllers/friends');
require("console-stamp")(console, "m/dd HH:MM:ss");
var mongoose = require('mongoose');
var User = mongoose.model('User');
const user = require(`${__dirname}/../../app/controllers/users.js`);
let userId = {};

var avatars = require(__dirname + '/../../app/controllers/avatars.js').all();
// Valid characters to use to generate random private game IDs
Expand Down

0 comments on commit 2ed1a94

Please sign in to comment.