Browse Source

Minor fixes to get the contact and some 404 pages to work.

pull/62/head
jrtechs 5 years ago
parent
commit
ed810abb74
3 changed files with 12 additions and 9 deletions
  1. +3
    -5
      includes/downloads.js
  2. +2
    -2
      routes/about.js
  3. +7
    -2
      routes/contact.js

+ 3
- 5
includes/downloads.js View File

@ -3,9 +3,7 @@
including html files easier for me programming.
*/
//file IO
const utils = require('../utils/utils.js');
const pageBuilder = require('../utils/pageBuilder');
//DB query
const sql = require('../utils/sql');
@ -38,13 +36,13 @@ module.exports=
}
else
{
utils.print404(res);
pageBuilder.print404(res);
}
});
}
else
{
utils.print404(res);
pageBuilder.print404(res);
}
});
}

+ 2
- 2
routes/about.js View File

@ -1,6 +1,6 @@
const routes = require('express').Router();
const utils = require('../utils/utils.js');
const pageBuilder = require('../utils/pageBuilder');
routes.get('/', (request, result) =>
{
@ -10,7 +10,7 @@ routes.get('/', (request, result) =>
routes.get('*', (request, result) =>
{
utils.print404(result);
pageBuilder.print404(result);
});
module.exports = routes;

+ 7
- 2
routes/contact.js View File

@ -1,15 +1,20 @@
const routes = require('express').Router();
const utils = require('../utils/utils.js');
const pageBuilder = require('../utils/pageBuilder');
routes.get('/', (request, result) =>
{
require("../blog/contact.js").main(request, result);
});
routes.post('/', (request, result) =>
{
require("../blog/contact.js").main(request, result);
});
routes.get('*', (request, result) =>
{
utils.print404(result);
pageBuilder.print404(result);
});
module.exports = routes;

Loading…
Cancel
Save