uga aga
This commit is contained in:
@@ -754,8 +754,8 @@ export const handleUpload = async (req, res, self) => {
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast new_item event for live grid updates (only if auto-approved and public)
|
||||
if (!manualApproval && targetVisibility === 0) {
|
||||
// Broadcast new_item event for live grid updates (only if auto-approved)
|
||||
if (!manualApproval) {
|
||||
try {
|
||||
await db`SELECT pg_notify('new_item', ${JSON.stringify({
|
||||
id: itemid,
|
||||
@@ -764,7 +764,9 @@ export const handleUpload = async (req, res, self) => {
|
||||
username: req.session.user,
|
||||
display_name: req.session.display_name || null,
|
||||
tag_id: effectiveRating ? (effectiveRating === 'sfw' ? 1 : (effectiveRating === 'nsfw' ? 2 : (cfg.nsfl_tag_id || 3))) : 0,
|
||||
is_oc: !!is_oc
|
||||
is_oc: !!is_oc,
|
||||
slug: itemSlug,
|
||||
visibility: targetVisibility
|
||||
})})`;
|
||||
} catch (err) {
|
||||
console.error('[UPLOAD] new_item notify failed:', err);
|
||||
|
||||
Reference in New Issue
Block a user