You've already forked AstralRinth
forked from didirus/AstralRinth
Public Webhook Fixes (#493)
* Public discord webhook * Switch to jsonb for most queries + make gallery featured first * Run fmt + clippy + prepare
This commit is contained in:
@@ -500,7 +500,7 @@ pub async fn project_edit(
|
||||
{
|
||||
crate::util::webhook::send_discord_webhook(
|
||||
project_item.inner.id.into(),
|
||||
&*pool,
|
||||
&pool,
|
||||
webhook_url,
|
||||
)
|
||||
.await
|
||||
@@ -529,7 +529,7 @@ pub async fn project_edit(
|
||||
{
|
||||
crate::util::webhook::send_discord_webhook(
|
||||
project_item.inner.id.into(),
|
||||
&*pool,
|
||||
&pool,
|
||||
webhook_url,
|
||||
)
|
||||
.await
|
||||
@@ -1483,14 +1483,13 @@ pub async fn add_gallery_item(
|
||||
}
|
||||
|
||||
database::models::project_item::GalleryItem {
|
||||
project_id: project_item.id,
|
||||
image_url: format!("{}/{}", cdn_url, url),
|
||||
featured: item.featured,
|
||||
title: item.title,
|
||||
description: item.description,
|
||||
created: Utc::now(),
|
||||
}
|
||||
.insert(&mut transaction)
|
||||
.insert(project_item.id, &mut transaction)
|
||||
.await?;
|
||||
|
||||
transaction.commit().await?;
|
||||
|
||||
Reference in New Issue
Block a user