Fix clippy errors + lint, use turbo CI

This commit is contained in:
Jai A
2024-10-18 16:07:35 -07:00
parent 663ab83b08
commit 8dd955563e
186 changed files with 10615 additions and 6433 deletions

View File

@@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize};
use crate::models::{
ids::{
NotificationId, OrganizationId, ProjectId, ReportId, TeamId, ThreadId, ThreadMessageId,
UserId, VersionId,
NotificationId, OrganizationId, ProjectId, ReportId, TeamId, ThreadId,
ThreadMessageId, UserId, VersionId,
},
notifications::{Notification, NotificationAction, NotificationBody},
projects::ProjectStatus,
@@ -78,11 +78,21 @@ pub enum LegacyNotificationBody {
impl LegacyNotification {
pub fn from(notification: Notification) -> Self {
let type_ = match &notification.body {
NotificationBody::ProjectUpdate { .. } => Some("project_update".to_string()),
NotificationBody::TeamInvite { .. } => Some("team_invite".to_string()),
NotificationBody::OrganizationInvite { .. } => Some("organization_invite".to_string()),
NotificationBody::StatusChange { .. } => Some("status_change".to_string()),
NotificationBody::ModeratorMessage { .. } => Some("moderator_message".to_string()),
NotificationBody::ProjectUpdate { .. } => {
Some("project_update".to_string())
}
NotificationBody::TeamInvite { .. } => {
Some("team_invite".to_string())
}
NotificationBody::OrganizationInvite { .. } => {
Some("organization_invite".to_string())
}
NotificationBody::StatusChange { .. } => {
Some("status_change".to_string())
}
NotificationBody::ModeratorMessage { .. } => {
Some("moderator_message".to_string())
}
NotificationBody::LegacyMarkdown {
notification_type, ..
} => notification_type.clone(),