Фото
-
+
diff --git a/server.js b/server.js
index 888cfd7..d5b8927 100644
--- a/server.js
+++ b/server.js
@@ -11446,7 +11446,7 @@ app.get('/api/photos', requireAuth, async (req, res) => {
try {
const conditions = [];
const params = [];
- if (search) { params.push(`%${search}%`); conditions.push(`t.title ILIKE $${params.length}`); }
+ if (search) { params.push(`%${search}%`); conditions.push(`(t.title ILIKE $${params.length} OR t.path ILIKE $${params.length} OR COALESCE(t.student_name, '') ILIKE $${params.length} OR COALESCE(t.group_name, '') ILIKE $${params.length})`); }
if (student_name) { params.push(student_name); conditions.push(`t.student_name = $${params.length}`); }
if (group_id) { params.push(group_id); conditions.push(`t.group_id = $${params.length}`); }
if (student_id) {