Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/labrinth/src/routes/v3/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ pub async fn organizations_edit(
if let Some(slug) = &new_organization.slug {
if !perms.contains(OrganizationPermissions::EDIT_DETAILS) {
return Err(ApiError::Auth(eyre::eyre!(
"You do not have the permissions to edit the slug of this organization!",
"You do not have the permissions to edit this organization's URL!",
)));
}

Expand All @@ -657,7 +657,7 @@ pub async fn organizations_edit(
.wrap_internal_err("fetching organization from database")?;
if existing.is_some() {
return Err(ApiError::Request(eyre::eyre!(
"Slug collides with other organization's id!",
"Your URL is already being used by another organization!",
)));
}

Expand All @@ -683,7 +683,7 @@ pub async fn organizations_edit(

if results.exists.unwrap_or(true) {
return Err(ApiError::Request(eyre::eyre!(
"Slug collides with other organization's id!",
"Your URL is already being used by another organization!",
)));
}
}
Expand Down
6 changes: 3 additions & 3 deletions apps/labrinth/src/routes/v3/projects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ pub async fn project_edit_internal(
if let Some(slug) = &new_project.slug {
if !perms.contains(ProjectPermissions::EDIT_DETAILS) {
return Err(ApiError::Auth(eyre::eyre!(
"You do not have the permissions to edit the slug of this project!",
"You do not have the permissions to edit this project's URL!",
)));
}

Expand All @@ -1021,7 +1021,7 @@ pub async fn project_edit_internal(
.wrap_internal_err("checking project slug availability")?;
if existing.is_some() {
return Err(ApiError::Request(eyre::eyre!(
"Slug collides with other project's id!",
"Your URL is already being used by another project!",
)));
}

Expand All @@ -1047,7 +1047,7 @@ pub async fn project_edit_internal(

if results.exists.unwrap_or(true) {
return Err(ApiError::Request(eyre::eyre!(
"Slug collides with other project's id!",
"Your URL is already being used by another project!",
)));
}
}
Expand Down
Loading