Browse Source

Fixed error with admin.js and the categories template.

pull/46/head
jrtechs 5 years ago
parent
commit
ec33aa7a86
3 changed files with 4 additions and 8 deletions
  1. +3
    -6
      sites/admin.js
  2. +1
    -1
      templates/admin/adminHome.html
  3. +0
    -1
      utils/sql.js

+ 3
- 6
sites/admin.js View File

@ -1,9 +1,6 @@
//sending static content
const includes = require('../includes/includes.js');
//used for file IO
const utils = require('../utils/utils.js');
//used to append static content to result
const contentLoader = require('../includes/staticContentServer.js');
@ -40,11 +37,11 @@ module.exports=
const file = "../admin/admin.js";
var templateContext = Object();
Promise.all([includes.fetchTemplate("admin/adminMain.html")],
Promise.all([includes.fetchTemplate("admin/adminMain.html"),
includes.printAdminHeader(templateContext),
require(file).main(request, clientAddress, templateContext, filename),
includes.printFooter(templateContext)
).then(function(content)
includes.printFooter(templateContext),
]).then(function(content)
{
result.write(whiskers.render(content[0], templateContext));
result.end();

+ 1
- 1
templates/admin/adminHome.html View File

@ -94,7 +94,7 @@
<td>{cat.name}</td>
<td>{cat.url}</td>
<td>{cat.category_id}</td>
</tr>>
</tr>
{/for}
</tbody>
</table>

+ 0
- 1
utils/sql.js View File

@ -405,7 +405,6 @@ module.exports=
const q = "insert into users(user_name, password, salt) values('" + cleanName + "'," +
"'" + hashedPassword.pass + "','" + hashedPassword.salt + "')";
return insert(q);
},

Loading…
Cancel
Save