Add public curator notes and U-shaped hall wall hang.

Paintings get editable curator notes with brass plates in the 3D hall, and visit order now uses the far/end wall between left and right.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-25 14:21:22 +03:00
co-authored by Cursor
parent 5ddc3fd7f0
commit bc8369e373
29 changed files with 648 additions and 70 deletions
+11 -4
View File
@@ -38,7 +38,7 @@ router.post('/login', async (req, res) => {
try {
const { rows } = await pool.query(
`SELECT id, username, password_hash FROM users WHERE username = $1`,
`SELECT id, username, password_hash FROM users WHERE LOWER(username) = LOWER($1)`,
[username.trim()]
);
if (rows.length === 0) {
@@ -56,9 +56,16 @@ router.post('/login', async (req, res) => {
req.session.userId = user.id;
req.session.username = user.username;
res.json({
role: 'curator',
username: user.username,
// Ensure the store writes before the response finishes (proxy / HTTPS).
req.session.save((err) => {
if (err) {
console.error('Auth session save error:', err.message);
return res.status(500).json({ error: 'Login failed' });
}
res.json({
role: 'curator',
username: user.username,
});
});
} catch (err) {
console.error('Auth login error:', err.message);