Initiate socket connection on load

This commit is contained in:
Robbie Antenesse 2018-12-26 16:48:14 -07:00
parent dd54dadfdd
commit f2948edcc6
2 changed files with 2 additions and 5 deletions

View File

@ -1,4 +1,6 @@
$(document).ready(function() {
var socket = io();
$('.modal-background, .modal-close').click(function() {
$(this).parent('.modal').removeClass('is-active');
});

View File

@ -52,11 +52,6 @@ function Server () {
});
this.server.post('/give', (req, res) => {
console.log(req.body);
console.log(req.files);
let success = false;
if (Object.keys(req.files).length > 0
&& req.body.hasOwnProperty('title') && req.body.title.trim() !== ''
&& req.body.hasOwnProperty('summary') && req.body.summary.trim() !== '') {