wow
This commit is contained in:
parent
04969499c0
commit
4c3d96778d
1 changed files with 23 additions and 0 deletions
|
|
@ -545,6 +545,17 @@ export default new Elysia({ prefix: "/post" })
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Saved ${savedCount} Pixiv media records to MongoDB. Failed: ${failedCount}`);
|
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({
|
await createAuditLog({
|
||||||
actor: {
|
actor: {
|
||||||
userId: requester.userId,
|
userId: requester.userId,
|
||||||
|
|
@ -670,6 +681,18 @@ export default new Elysia({ prefix: "/post" })
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Saved ${savedCount} media records to MongoDB. Failed: ${failedCount}`);
|
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({
|
await createAuditLog({
|
||||||
actor: {
|
actor: {
|
||||||
userId: requester.userId,
|
userId: requester.userId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue