You've already forked AstralRinth
forked from didirus/AstralRinth
Add notification for project status updates (#511)
* Add notification for project status updates * aaaaaa * cargo sqlx prepare * use friendly name of statuses * Update src/models/projects.rs Co-authored-by: triphora <emma@modrinth.com> * only send notifications to accepted users * only send notifications for people not on the team * cargo sqlx prepare * != * fully address pr comments Co-authored-by: triphora <emma@modrinth.com> Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
34af33607b
commit
161dee89ec
@@ -319,6 +319,20 @@ impl ProjectStatus {
|
||||
ProjectStatus::Private => "private",
|
||||
}
|
||||
}
|
||||
pub fn as_friendly_str(&self) -> &'static str {
|
||||
match self {
|
||||
ProjectStatus::Approved => "Listed",
|
||||
ProjectStatus::Rejected => "Rejected",
|
||||
ProjectStatus::Draft => "Draft",
|
||||
ProjectStatus::Unlisted => "Unlisted",
|
||||
ProjectStatus::Processing => "Under review",
|
||||
ProjectStatus::Unknown => "Unknown",
|
||||
ProjectStatus::Archived => "Archived",
|
||||
ProjectStatus::Withheld => "Withheld",
|
||||
ProjectStatus::Scheduled => "Scheduled",
|
||||
ProjectStatus::Private => "Private",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iterator() -> impl Iterator<Item = ProjectStatus> {
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user