Added security policies to all endpoints and implemented file upload feature on posts

This commit is contained in:
Sven laptop
2026-07-24 23:25:31 +02:00
parent 9519a01ca0
commit 9e56f00c1e
19 changed files with 718 additions and 134 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ const pool = require('../../db');
var crypto = require('crypto');
const { promisify } = require('util');
const { sanitizePersonInput } = require('../../middleware/sanitize_person_input');
const { strictInput } = require('../../middleware/strict_input');
const scrypt = promisify(crypto.scrypt);
@@ -84,5 +85,5 @@ async function create_people(req, res) {
};
router.post('/', sanitizePersonInput, create_people);
router.post('/', strictInput({ body: ['name', 'username', 'email', 'password'] }), sanitizePersonInput, create_people);
module.exports = router;