update
This commit is contained in:
parent
8186847726
commit
44a90afe19
@ -543,12 +543,12 @@ app.get('/api/event-images', async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// GET event images by event ID
|
// GET event images by event ID
|
||||||
app.get('/api/event-images/event/:eventId', authenticateToken, requireAdmin, async (req, res) => {
|
app.get('/api/event-images/event/:eventId', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const [rows] = await pool.execute(
|
const [rows] = await pool.execute(
|
||||||
'SELECT * FROM event_images WHERE eventid = ? ORDER BY sort_order ASC, id ASC',
|
'SELECT * FROM event_images WHERE eventid = ? ORDER BY id ASC',
|
||||||
[req.params.eventId]
|
[req.params.eventId]
|
||||||
);
|
);
|
||||||
res.json({
|
res.json({
|
||||||
success: true,
|
success: true,
|
||||||
data: rows
|
data: rows
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user