Add user GET endpoint, schemas, and security middlewares
Introduces GET /users/:id endpoint with validation schema, adds tests for user and register routes, and applies security middlewares (helmet, hpp, cors) to the server. Also adds ESLint configuration and updates logger with linting comments.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
const crypto = require("node:crypto")
|
||||
const DefaultError = require("../errors/DefaultError")
|
||||
|
||||
function register({ email, username, password }) {
|
||||
if (true) {
|
||||
function register({ email, username }) {
|
||||
const canRegister = true
|
||||
if (canRegister === true) {
|
||||
return {
|
||||
id: crypto.randomUUID(),
|
||||
username: username,
|
||||
|
||||
Reference in New Issue
Block a user