You've already forked AstralRinth
forked from didirus/AstralRinth
Fix TM pending in project route (#584)
This commit is contained in:
@@ -1053,7 +1053,7 @@ pub async fn project_edit(
|
||||
|
||||
if let Some(moderation_message) = &new_project.moderation_message {
|
||||
if !user.role.is_mod()
|
||||
&& (!project_item.inner.status.is_approved() || moderation_message != &None)
|
||||
&& (!project_item.inner.status.is_approved() || moderation_message.is_some())
|
||||
{
|
||||
return Err(ApiError::CustomAuthentication(
|
||||
"You do not have the permissions to edit the moderation message of this project!"
|
||||
@@ -1077,7 +1077,7 @@ pub async fn project_edit(
|
||||
if let Some(moderation_message_body) = &new_project.moderation_message_body {
|
||||
if !user.role.is_mod()
|
||||
&& (!project_item.inner.status.is_approved()
|
||||
|| moderation_message_body != &None)
|
||||
|| moderation_message_body.is_some())
|
||||
{
|
||||
return Err(ApiError::CustomAuthentication(
|
||||
"You do not have the permissions to edit the moderation message body of this project!"
|
||||
|
||||
Reference in New Issue
Block a user