This commit is contained in:
암냥 2026-05-03 22:09:51 +09:00
commit 4c3d96778d

View file

@ -545,6 +545,17 @@ export default new Elysia({ prefix: "/post" })
}
console.log(`Saved ${savedCount} Pixiv media records to MongoDB. Failed: ${failedCount}`);
if (savedCount > 0) {
await sendDiscordNotification({
title: pixivData.title || "Pixiv Artwork",
url: pixivData.url,
author: body.author ? body.author : (pixivData.author_name || "unknown"),
tags: normalizedTags,
imageUrl: mediaUrls[0],
});
}
await createAuditLog({
actor: {
userId: requester.userId,
@ -670,6 +681,18 @@ export default new Elysia({ prefix: "/post" })
}
console.log(`Saved ${savedCount} media records to MongoDB. Failed: ${failedCount}`);
if (savedCount > 0) {
const firstMedia = media[0];
await sendDiscordNotification({
title: tweetData.tweet.text?.substring(0, 100) || "Twitter Post",
url: body.url,
author: body.author ? body.author : tweetData.tweet.author.name,
tags: normalizeTags(body.tag || ["미분류"]),
imageUrl: firstMedia.url,
});
}
await createAuditLog({
actor: {
userId: requester.userId,