Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored and wsxiaoys committed Dec 5, 2024
1 parent 271748b commit 4e8d6f0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ee/tabby-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mod invitations;
mod job_runs;
#[cfg(test)]
mod migration_tests;
mod notifications;
mod oauth_credential;
mod password_reset;
mod provided_repositories;
Expand All @@ -45,7 +46,6 @@ mod user_events;
mod user_groups;
mod users;
mod web_documents;
mod notifications;

use anyhow::Result;
use sql_query_builder as sql;
Expand Down
5 changes: 2 additions & 3 deletions ee/tabby-db/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ impl DbConn {

#[cfg(test)]
mod tests {
use crate::testutils;

use super::*;
use crate::testutils;

/// Smoke test to ensure sql query is valid, actual functionality test shall happens at service level.
#[tokio::test]
Expand All @@ -79,4 +78,4 @@ mod tests {
let notifications = db.list_notifications_within_7days(user1).await.unwrap();
assert!(notifications.is_empty())
}
}
}
12 changes: 8 additions & 4 deletions ee/tabby-schema/src/dao.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ use tabby_db::{
};

use crate::{
integration::{Integration, IntegrationKind, IntegrationStatus}, notification::NotificationKind, repository::RepositoryKind, schema::{
integration::{Integration, IntegrationKind, IntegrationStatus},
notification::NotificationKind,
repository::RepositoryKind,
schema::{
auth::{self, OAuthCredential, OAuthProvider},
email::{AuthMethod, EmailSetting, Encryption},
job,
Expand All @@ -19,7 +22,8 @@ use crate::{
setting::{NetworkSetting, SecuritySetting},
user_event::{EventKind, UserEvent},
CoreError,
}, thread::{self, MessageAttachment}
},
thread::{self, MessageAttachment},
};

impl From<InvitationDAO> for auth::Invitation {
Expand Down Expand Up @@ -490,7 +494,7 @@ impl DbEnum for NotificationKind {
fn as_enum_str(&self) -> &'static str {
match self {
NotificationKind::Admin => "admin",
NotificationKind::AllUser => "all_user"
NotificationKind::AllUser => "all_user",
}
}

Expand All @@ -501,4 +505,4 @@ impl DbEnum for NotificationKind {
_ => bail!("{s} is not a valid value for NotificationKind"),
}
}
}
}
2 changes: 1 addition & 1 deletion ee/tabby-schema/src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ pub mod integration;
pub mod interface;
pub mod job;
pub mod license;
pub mod notification;
pub mod repository;
pub mod setting;
pub mod thread;
pub mod user_event;
pub mod user_group;
pub mod web_documents;
pub mod worker;
pub mod notification;

use std::{sync::Arc, time::Instant};

Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-schema/src/schema/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ use juniper::GraphQLEnum;
pub enum NotificationKind {
Admin,
AllUser,
}
}

0 comments on commit 4e8d6f0

Please sign in to comment.