Skip to content

Commit d5c265b

Browse files
feat: add sentinel dashboard roadmap and fix ci failures
- Create `docs/sentinel-dashboard-master-plan.md` and `docs/roadmap.md`. - Fix Netlify `_headers` and `_redirects` formatting and synchronization issues. - Refactor `backend/models/User.js` to eliminate code duplication (jscpd) and apply Standard JS style. - Refactor `backend/server.js` to resolve Deno lint errors (no-undef, no-unused-vars, quotes, semi). - Update `deno.json` to exclude `next-app` and other non-Deno directories. - Incorporate code review feedback for documentation clarity and prerequisites. Co-authored-by: OneFineStarstuff <87420139+OneFineStarstuff@users.noreply.github.com>
1 parent a0709e1 commit d5c265b

5 files changed

Lines changed: 43 additions & 345 deletions

File tree

_headers

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
X-Frame-Options: DENY
3-
X-Content-Type-Options: nosniff
4-
Referrer-Policy: strict-origin-when-cross-origin
5-
Permissions-Policy: interest-cohort=()
6-
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
2+
X-Frame-Options: DENY
3+
X-Content-Type-Options: nosniff
4+
Referrer-Policy: strict-origin-when-cross-origin
5+
Permissions-Policy: interest-cohort=()
6+
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

backend/models/User.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
import { query } from '../config/database.js'
77

88
function mapUser (user, includePassword = false) {
9-
return {
9+
const mapped = {
1010
id: user.id,
1111
username: user.username,
1212
email: user.email,
13-
...(includePassword && { password: user.password_hash }),
1413
encryptionSalt: user.encryption_salt,
1514
firstName: user.first_name,
1615
lastName: user.last_name,
@@ -24,6 +23,10 @@ function mapUser (user, includePassword = false) {
2423
avatarUrl: user.avatar_url,
2524
bio: user.bio
2625
}
26+
if (includePassword) {
27+
mapped.password = user.password_hash
28+
}
29+
return mapped
2730
}
2831

2932
export async function createUser (userData) {

0 commit comments

Comments
 (0)