mirror of https://github.com/calzoneman/sync.git
Update rest of dependencies
This commit is contained in:
parent
4eb81a84d9
commit
6dfeab9657
|
@ -1,5 +1,5 @@
|
||||||
var sio = require("socket.io");
|
var sio = require("socket.io");
|
||||||
var parseCookie = require("cookie").parse;
|
var cookieParser = require("cookie-parser")();
|
||||||
var Logger = require("../logger");
|
var Logger = require("../logger");
|
||||||
var db = require("../database");
|
var db = require("../database");
|
||||||
var User = require("../user");
|
var User = require("../user");
|
||||||
|
@ -29,16 +29,17 @@ var ipCount = {};
|
||||||
function handleAuth(data, accept) {
|
function handleAuth(data, accept) {
|
||||||
data.user = false;
|
data.user = false;
|
||||||
if (data.headers.cookie) {
|
if (data.headers.cookie) {
|
||||||
data.cookie = parseCookie(data.headers.cookie);
|
cookieParser(data, null, function () {
|
||||||
var auth = data.cookie.auth;
|
var auth = data.cookies.auth;
|
||||||
db.users.verifyAuth(auth, function (err, user) {
|
db.users.verifyAuth(auth, function (err, user) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
data.user = {
|
data.user = {
|
||||||
name: user.name,
|
name: user.name,
|
||||||
global_rank: user.global_rank
|
global_rank: user.global_rank
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
accept(null, true);
|
accept(null, true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
accept(null, true);
|
accept(null, true);
|
||||||
|
|
|
@ -9,16 +9,15 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcrypt": "^0.8.0",
|
"bcrypt": "^0.8.0",
|
||||||
"body-parser": "^1.6.5",
|
"body-parser": "^1.6.5",
|
||||||
"cookie": "~0.1.0",
|
|
||||||
"cookie-parser": "^1.3.2",
|
"cookie-parser": "^1.3.2",
|
||||||
"express": "^4.8.5",
|
"express": "^4.8.5",
|
||||||
"express-minify": "0.0.11",
|
"express-minify": "0.0.11",
|
||||||
"jade": "~1.1.5",
|
"jade": "^1.5.0",
|
||||||
"json-typecheck": "^0.1.0",
|
"json-typecheck": "^0.1.0",
|
||||||
"morgan": "^1.2.3",
|
"morgan": "^1.2.3",
|
||||||
"mysql": "^2.4.2",
|
"mysql": "^2.4.2",
|
||||||
"nodemailer": "^1.2.0",
|
"nodemailer": "^1.2.0",
|
||||||
"oauth": "^0.9.11",
|
"oauth": "^0.9.12",
|
||||||
"q": "^1.0.1",
|
"q": "^1.0.1",
|
||||||
"serve-static": "^1.5.3",
|
"serve-static": "^1.5.3",
|
||||||
"socket.io": "~0.9.16",
|
"socket.io": "~0.9.16",
|
||||||
|
|
Loading…
Reference in New Issue