Skip to content

Commit

Permalink
#103 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jcolson committed Mar 13, 2021
1 parent 81eab2e commit c9a5e70
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ let server = app
}
})
.use(async function (request, response, next) {
console.log('in middleware, ensuring user is logged in');
let desiredDestination = request.path;
const desiredDestination = request.path;
console.log(`in middleware, ensuring user is logged in for ${desiredDestination}`);
// console.log('desiredDestination ' + desiredDestination);
if (!request.session.discordMe) {
console.log(`user is _not_ logged in, redirecting`);
Expand Down Expand Up @@ -250,8 +250,17 @@ let server = app
response.end(error.message);
}
})
.get(ROUTE_EVENTSSET, async (request, resposne) => {

.post(ROUTE_EVENTSSET, async (request, response) => {
try {
console.log('serving ' + ROUTE_EVENTSSET);
console.log(request.body);
response.json({ status: 'false' });
} catch (error) {
console.error(error.message);
response.setHeader('Content-Type', 'text/html');
response.status(500);
response.end(error.message);
}
})
.listen(Config.httpServerPort);

Expand Down

0 comments on commit c9a5e70

Please sign in to comment.