diff --git a/Cargo.lock b/Cargo.lock index 3f67e77..e163ec3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -931,7 +931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "ext_calckey_model_migration" +name = "ext_model_migration" version = "0.3.0-alpha" dependencies = [ "sea-orm-migration", @@ -1612,11 +1612,11 @@ dependencies = [ "idna", "itertools", "lru", - "magnetar_calckey_model", "magnetar_common", "magnetar_core", "magnetar_federation", "magnetar_host_meta", + "magnetar_model", "magnetar_nodeinfo", "magnetar_sdk", "magnetar_webfinger", @@ -1666,30 +1666,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "magnetar_calckey_model" -version = "0.3.0-alpha" -dependencies = [ - "chrono", - "ck", - "dotenvy", - "ext_calckey_model_migration", - "futures-core", - "futures-util", - "magnetar_common", - "magnetar_sdk", - "redis", - "sea-orm", - "serde", - "serde_json", - "strum", - "thiserror", - "tokio", - "tokio-util", - "tracing", - "url", -] - [[package]] name = "magnetar_common" version = "0.3.0-alpha" @@ -1774,6 +1750,30 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "magnetar_model" +version = "0.3.0-alpha" +dependencies = [ + "chrono", + "ck", + "dotenvy", + "ext_model_migration", + "futures-core", + "futures-util", + "magnetar_common", + "magnetar_sdk", + "redis", + "sea-orm", + "serde", + "serde_json", + "strum", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", +] + [[package]] name = "magnetar_nodeinfo" version = "0.3.0-alpha" diff --git a/Cargo.toml b/Cargo.toml index 6aeb7e5..7cb9a8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ "ext_federation", "ext_nodeinfo", "ext_webfinger", - "ext_calckey_model", + "ext_model", "fe_calckey", "magnetar_common", "magnetar_sdk", @@ -86,7 +86,7 @@ magnetar_federation = { path = "./ext_federation" } magnetar_host_meta = { path = "./ext_host_meta" } magnetar_webfinger = { path = "./ext_webfinger" } magnetar_nodeinfo = { path = "./ext_nodeinfo" } -magnetar_calckey_model = { path = "./ext_calckey_model" } +magnetar_model = { path = "./ext_model" } magnetar_sdk = { path = "./magnetar_sdk" } cached = { workspace = true } diff --git a/ext_activity_streams/Cargo.toml b/ext_activity_streams/Cargo.toml new file mode 100644 index 0000000..1d71e4c --- /dev/null +++ b/ext_activity_streams/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "magnetar_activity_streams" +version.workspace = true +edition.workspace = true +license = "MIT OR Apache-2.0" + +[lib] +crate-type = ["rlib"] + +[dependencies] +async-trait = { workspace = true } + +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } + +chrono = { workspace = true, features = ["serde"] } +thiserror = { workspace = true } +url = { workspace = true, features = ["serde"] } + +[dev-dependencies] +tokio = { workspace = true, features = ["full"] } diff --git a/ext_activity_streams/src/lib.rs b/ext_activity_streams/src/lib.rs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ext_activity_streams/src/lib.rs @@ -0,0 +1 @@ + diff --git a/ext_calckey_model/Cargo.toml b/ext_model/Cargo.toml similarity index 90% rename from ext_calckey_model/Cargo.toml rename to ext_model/Cargo.toml index 622db60..780e052 100644 --- a/ext_calckey_model/Cargo.toml +++ b/ext_model/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "magnetar_calckey_model" +name = "magnetar_model" version.workspace = true edition.workspace = true @@ -8,7 +8,7 @@ crate-type = ["rlib"] [dependencies] ck = { path = "./entity_ck" } -ext_calckey_model_migration = { path = "./migration" } +ext_model_migration = { path = "./migration" } magnetar_common = { path = "../magnetar_common" } magnetar_sdk = { path = "../magnetar_sdk" } diff --git a/ext_calckey_model/entity_ck/Cargo.toml b/ext_model/entity_ck/Cargo.toml similarity index 100% rename from ext_calckey_model/entity_ck/Cargo.toml rename to ext_model/entity_ck/Cargo.toml diff --git a/ext_calckey_model/entity_ck/src/entities/abuse_user_report.rs b/ext_model/entity_ck/src/entities/abuse_user_report.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/abuse_user_report.rs rename to ext_model/entity_ck/src/entities/abuse_user_report.rs diff --git a/ext_calckey_model/entity_ck/src/entities/access_token.rs b/ext_model/entity_ck/src/entities/access_token.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/access_token.rs rename to ext_model/entity_ck/src/entities/access_token.rs diff --git a/ext_calckey_model/entity_ck/src/entities/ad.rs b/ext_model/entity_ck/src/entities/ad.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/ad.rs rename to ext_model/entity_ck/src/entities/ad.rs diff --git a/ext_calckey_model/entity_ck/src/entities/announcement.rs b/ext_model/entity_ck/src/entities/announcement.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/announcement.rs rename to ext_model/entity_ck/src/entities/announcement.rs diff --git a/ext_calckey_model/entity_ck/src/entities/announcement_read.rs b/ext_model/entity_ck/src/entities/announcement_read.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/announcement_read.rs rename to ext_model/entity_ck/src/entities/announcement_read.rs diff --git a/ext_calckey_model/entity_ck/src/entities/antenna.rs b/ext_model/entity_ck/src/entities/antenna.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/antenna.rs rename to ext_model/entity_ck/src/entities/antenna.rs diff --git a/ext_calckey_model/entity_ck/src/entities/antenna_note.rs b/ext_model/entity_ck/src/entities/antenna_note.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/antenna_note.rs rename to ext_model/entity_ck/src/entities/antenna_note.rs diff --git a/ext_calckey_model/entity_ck/src/entities/app.rs b/ext_model/entity_ck/src/entities/app.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/app.rs rename to ext_model/entity_ck/src/entities/app.rs diff --git a/ext_calckey_model/entity_ck/src/entities/attestation_challenge.rs b/ext_model/entity_ck/src/entities/attestation_challenge.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/attestation_challenge.rs rename to ext_model/entity_ck/src/entities/attestation_challenge.rs diff --git a/ext_calckey_model/entity_ck/src/entities/auth_session.rs b/ext_model/entity_ck/src/entities/auth_session.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/auth_session.rs rename to ext_model/entity_ck/src/entities/auth_session.rs diff --git a/ext_calckey_model/entity_ck/src/entities/blocking.rs b/ext_model/entity_ck/src/entities/blocking.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/blocking.rs rename to ext_model/entity_ck/src/entities/blocking.rs diff --git a/ext_calckey_model/entity_ck/src/entities/clip.rs b/ext_model/entity_ck/src/entities/clip.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/clip.rs rename to ext_model/entity_ck/src/entities/clip.rs diff --git a/ext_calckey_model/entity_ck/src/entities/clip_note.rs b/ext_model/entity_ck/src/entities/clip_note.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/clip_note.rs rename to ext_model/entity_ck/src/entities/clip_note.rs diff --git a/ext_calckey_model/entity_ck/src/entities/drive_file.rs b/ext_model/entity_ck/src/entities/drive_file.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/drive_file.rs rename to ext_model/entity_ck/src/entities/drive_file.rs diff --git a/ext_calckey_model/entity_ck/src/entities/drive_folder.rs b/ext_model/entity_ck/src/entities/drive_folder.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/drive_folder.rs rename to ext_model/entity_ck/src/entities/drive_folder.rs diff --git a/ext_calckey_model/entity_ck/src/entities/emoji.rs b/ext_model/entity_ck/src/entities/emoji.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/emoji.rs rename to ext_model/entity_ck/src/entities/emoji.rs diff --git a/ext_calckey_model/entity_ck/src/entities/follow_request.rs b/ext_model/entity_ck/src/entities/follow_request.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/follow_request.rs rename to ext_model/entity_ck/src/entities/follow_request.rs diff --git a/ext_calckey_model/entity_ck/src/entities/following.rs b/ext_model/entity_ck/src/entities/following.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/following.rs rename to ext_model/entity_ck/src/entities/following.rs diff --git a/ext_calckey_model/entity_ck/src/entities/hashtag.rs b/ext_model/entity_ck/src/entities/hashtag.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/hashtag.rs rename to ext_model/entity_ck/src/entities/hashtag.rs diff --git a/ext_calckey_model/entity_ck/src/entities/instance.rs b/ext_model/entity_ck/src/entities/instance.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/instance.rs rename to ext_model/entity_ck/src/entities/instance.rs diff --git a/ext_calckey_model/entity_ck/src/entities/meta.rs b/ext_model/entity_ck/src/entities/meta.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/meta.rs rename to ext_model/entity_ck/src/entities/meta.rs diff --git a/ext_calckey_model/entity_ck/src/entities/mod.rs b/ext_model/entity_ck/src/entities/mod.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/mod.rs rename to ext_model/entity_ck/src/entities/mod.rs diff --git a/ext_calckey_model/entity_ck/src/entities/moderation_log.rs b/ext_model/entity_ck/src/entities/moderation_log.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/moderation_log.rs rename to ext_model/entity_ck/src/entities/moderation_log.rs diff --git a/ext_calckey_model/entity_ck/src/entities/muted_note.rs b/ext_model/entity_ck/src/entities/muted_note.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/muted_note.rs rename to ext_model/entity_ck/src/entities/muted_note.rs diff --git a/ext_calckey_model/entity_ck/src/entities/muting.rs b/ext_model/entity_ck/src/entities/muting.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/muting.rs rename to ext_model/entity_ck/src/entities/muting.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note.rs b/ext_model/entity_ck/src/entities/note.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note.rs rename to ext_model/entity_ck/src/entities/note.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_edit.rs b/ext_model/entity_ck/src/entities/note_edit.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_edit.rs rename to ext_model/entity_ck/src/entities/note_edit.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_favorite.rs b/ext_model/entity_ck/src/entities/note_favorite.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_favorite.rs rename to ext_model/entity_ck/src/entities/note_favorite.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_reaction.rs b/ext_model/entity_ck/src/entities/note_reaction.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_reaction.rs rename to ext_model/entity_ck/src/entities/note_reaction.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_thread_muting.rs b/ext_model/entity_ck/src/entities/note_thread_muting.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_thread_muting.rs rename to ext_model/entity_ck/src/entities/note_thread_muting.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_unread.rs b/ext_model/entity_ck/src/entities/note_unread.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_unread.rs rename to ext_model/entity_ck/src/entities/note_unread.rs diff --git a/ext_calckey_model/entity_ck/src/entities/note_watching.rs b/ext_model/entity_ck/src/entities/note_watching.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/note_watching.rs rename to ext_model/entity_ck/src/entities/note_watching.rs diff --git a/ext_calckey_model/entity_ck/src/entities/notification.rs b/ext_model/entity_ck/src/entities/notification.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/notification.rs rename to ext_model/entity_ck/src/entities/notification.rs diff --git a/ext_calckey_model/entity_ck/src/entities/password_reset_request.rs b/ext_model/entity_ck/src/entities/password_reset_request.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/password_reset_request.rs rename to ext_model/entity_ck/src/entities/password_reset_request.rs diff --git a/ext_calckey_model/entity_ck/src/entities/poll.rs b/ext_model/entity_ck/src/entities/poll.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/poll.rs rename to ext_model/entity_ck/src/entities/poll.rs diff --git a/ext_calckey_model/entity_ck/src/entities/poll_vote.rs b/ext_model/entity_ck/src/entities/poll_vote.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/poll_vote.rs rename to ext_model/entity_ck/src/entities/poll_vote.rs diff --git a/ext_calckey_model/entity_ck/src/entities/prelude.rs b/ext_model/entity_ck/src/entities/prelude.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/prelude.rs rename to ext_model/entity_ck/src/entities/prelude.rs diff --git a/ext_calckey_model/entity_ck/src/entities/promo_note.rs b/ext_model/entity_ck/src/entities/promo_note.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/promo_note.rs rename to ext_model/entity_ck/src/entities/promo_note.rs diff --git a/ext_calckey_model/entity_ck/src/entities/promo_read.rs b/ext_model/entity_ck/src/entities/promo_read.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/promo_read.rs rename to ext_model/entity_ck/src/entities/promo_read.rs diff --git a/ext_calckey_model/entity_ck/src/entities/registration_ticket.rs b/ext_model/entity_ck/src/entities/registration_ticket.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/registration_ticket.rs rename to ext_model/entity_ck/src/entities/registration_ticket.rs diff --git a/ext_calckey_model/entity_ck/src/entities/registry_item.rs b/ext_model/entity_ck/src/entities/registry_item.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/registry_item.rs rename to ext_model/entity_ck/src/entities/registry_item.rs diff --git a/ext_calckey_model/entity_ck/src/entities/relay.rs b/ext_model/entity_ck/src/entities/relay.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/relay.rs rename to ext_model/entity_ck/src/entities/relay.rs diff --git a/ext_calckey_model/entity_ck/src/entities/renote_muting.rs b/ext_model/entity_ck/src/entities/renote_muting.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/renote_muting.rs rename to ext_model/entity_ck/src/entities/renote_muting.rs diff --git a/ext_calckey_model/entity_ck/src/entities/sea_orm_active_enums.rs b/ext_model/entity_ck/src/entities/sea_orm_active_enums.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/sea_orm_active_enums.rs rename to ext_model/entity_ck/src/entities/sea_orm_active_enums.rs diff --git a/ext_calckey_model/entity_ck/src/entities/signin.rs b/ext_model/entity_ck/src/entities/signin.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/signin.rs rename to ext_model/entity_ck/src/entities/signin.rs diff --git a/ext_calckey_model/entity_ck/src/entities/sw_subscription.rs b/ext_model/entity_ck/src/entities/sw_subscription.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/sw_subscription.rs rename to ext_model/entity_ck/src/entities/sw_subscription.rs diff --git a/ext_calckey_model/entity_ck/src/entities/used_username.rs b/ext_model/entity_ck/src/entities/used_username.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/used_username.rs rename to ext_model/entity_ck/src/entities/used_username.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user.rs b/ext_model/entity_ck/src/entities/user.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user.rs rename to ext_model/entity_ck/src/entities/user.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_ip.rs b/ext_model/entity_ck/src/entities/user_ip.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_ip.rs rename to ext_model/entity_ck/src/entities/user_ip.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_keypair.rs b/ext_model/entity_ck/src/entities/user_keypair.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_keypair.rs rename to ext_model/entity_ck/src/entities/user_keypair.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_list.rs b/ext_model/entity_ck/src/entities/user_list.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_list.rs rename to ext_model/entity_ck/src/entities/user_list.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_list_joining.rs b/ext_model/entity_ck/src/entities/user_list_joining.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_list_joining.rs rename to ext_model/entity_ck/src/entities/user_list_joining.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_note_pining.rs b/ext_model/entity_ck/src/entities/user_note_pining.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_note_pining.rs rename to ext_model/entity_ck/src/entities/user_note_pining.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_pending.rs b/ext_model/entity_ck/src/entities/user_pending.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_pending.rs rename to ext_model/entity_ck/src/entities/user_pending.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_profile.rs b/ext_model/entity_ck/src/entities/user_profile.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_profile.rs rename to ext_model/entity_ck/src/entities/user_profile.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_publickey.rs b/ext_model/entity_ck/src/entities/user_publickey.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_publickey.rs rename to ext_model/entity_ck/src/entities/user_publickey.rs diff --git a/ext_calckey_model/entity_ck/src/entities/user_security_key.rs b/ext_model/entity_ck/src/entities/user_security_key.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/user_security_key.rs rename to ext_model/entity_ck/src/entities/user_security_key.rs diff --git a/ext_calckey_model/entity_ck/src/entities/webhook.rs b/ext_model/entity_ck/src/entities/webhook.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/entities/webhook.rs rename to ext_model/entity_ck/src/entities/webhook.rs diff --git a/ext_calckey_model/entity_ck/src/lib.rs b/ext_model/entity_ck/src/lib.rs similarity index 100% rename from ext_calckey_model/entity_ck/src/lib.rs rename to ext_model/entity_ck/src/lib.rs diff --git a/ext_calckey_model/migration/Cargo.toml b/ext_model/migration/Cargo.toml similarity index 54% rename from ext_calckey_model/migration/Cargo.toml rename to ext_model/migration/Cargo.toml index d20128c..59eb8ed 100644 --- a/ext_calckey_model/migration/Cargo.toml +++ b/ext_model/migration/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ext_calckey_model_migration" +name = "ext_model_migration" version.workspace = true edition.workspace = true @@ -8,9 +8,12 @@ name = "migrate" path = "src/main.rs" [lib] -name = "ext_calckey_model_migration" +name = "ext_model_migration" path = "src/lib.rs" [dependencies] tokio = { workspace = true, features = ["full"] } -sea-orm-migration = { workspace = true, features = ["runtime-tokio-rustls", "sqlx-postgres"] } +sea-orm-migration = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlx-postgres", +] } diff --git a/ext_calckey_model/migration/README.md b/ext_model/migration/README.md similarity index 100% rename from ext_calckey_model/migration/README.md rename to ext_model/migration/README.md diff --git a/ext_calckey_model/migration/src/bootstrap_down.sql b/ext_model/migration/src/bootstrap_down.sql similarity index 100% rename from ext_calckey_model/migration/src/bootstrap_down.sql rename to ext_model/migration/src/bootstrap_down.sql diff --git a/ext_calckey_model/migration/src/bootstrap_up.sql b/ext_model/migration/src/bootstrap_up.sql similarity index 100% rename from ext_calckey_model/migration/src/bootstrap_up.sql rename to ext_model/migration/src/bootstrap_up.sql diff --git a/ext_calckey_model/migration/src/lib.rs b/ext_model/migration/src/lib.rs similarity index 100% rename from ext_calckey_model/migration/src/lib.rs rename to ext_model/migration/src/lib.rs diff --git a/ext_calckey_model/migration/src/m20220101_000001_bootstrap.rs b/ext_model/migration/src/m20220101_000001_bootstrap.rs similarity index 100% rename from ext_calckey_model/migration/src/m20220101_000001_bootstrap.rs rename to ext_model/migration/src/m20220101_000001_bootstrap.rs diff --git a/ext_calckey_model/migration/src/m20230729_201733_drop_messaging_integrations.rs b/ext_model/migration/src/m20230729_201733_drop_messaging_integrations.rs similarity index 100% rename from ext_calckey_model/migration/src/m20230729_201733_drop_messaging_integrations.rs rename to ext_model/migration/src/m20230729_201733_drop_messaging_integrations.rs diff --git a/ext_calckey_model/migration/src/m20230729_212237_user_unique_idx.rs b/ext_model/migration/src/m20230729_212237_user_unique_idx.rs similarity index 100% rename from ext_calckey_model/migration/src/m20230729_212237_user_unique_idx.rs rename to ext_model/migration/src/m20230729_212237_user_unique_idx.rs diff --git a/ext_calckey_model/migration/src/m20230806_142918_drop_featured_note_option.rs b/ext_model/migration/src/m20230806_142918_drop_featured_note_option.rs similarity index 100% rename from ext_calckey_model/migration/src/m20230806_142918_drop_featured_note_option.rs rename to ext_model/migration/src/m20230806_142918_drop_featured_note_option.rs diff --git a/ext_calckey_model/migration/src/m20240107_005747_remove_user_groups.rs b/ext_model/migration/src/m20240107_005747_remove_user_groups.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240107_005747_remove_user_groups.rs rename to ext_model/migration/src/m20240107_005747_remove_user_groups.rs diff --git a/ext_calckey_model/migration/src/m20240107_220523_generated_is_quote.rs b/ext_model/migration/src/m20240107_220523_generated_is_quote.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240107_220523_generated_is_quote.rs rename to ext_model/migration/src/m20240107_220523_generated_is_quote.rs diff --git a/ext_calckey_model/migration/src/m20240107_224446_generated_is_renote.rs b/ext_model/migration/src/m20240107_224446_generated_is_renote.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240107_224446_generated_is_renote.rs rename to ext_model/migration/src/m20240107_224446_generated_is_renote.rs diff --git a/ext_calckey_model/migration/src/m20240112_215106_remove_pages.rs b/ext_model/migration/src/m20240112_215106_remove_pages.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240112_215106_remove_pages.rs rename to ext_model/migration/src/m20240112_215106_remove_pages.rs diff --git a/ext_calckey_model/migration/src/m20240112_234759_remove_gallery.rs b/ext_model/migration/src/m20240112_234759_remove_gallery.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240112_234759_remove_gallery.rs rename to ext_model/migration/src/m20240112_234759_remove_gallery.rs diff --git a/ext_calckey_model/migration/src/m20240115_212109_remove_poll_vote_notification.rs b/ext_model/migration/src/m20240115_212109_remove_poll_vote_notification.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240115_212109_remove_poll_vote_notification.rs rename to ext_model/migration/src/m20240115_212109_remove_poll_vote_notification.rs diff --git a/ext_calckey_model/migration/src/m20240228_155051_mag_notification_types_muting.rs b/ext_model/migration/src/m20240228_155051_mag_notification_types_muting.rs similarity index 100% rename from ext_calckey_model/migration/src/m20240228_155051_mag_notification_types_muting.rs rename to ext_model/migration/src/m20240228_155051_mag_notification_types_muting.rs diff --git a/ext_calckey_model/migration/src/main.rs b/ext_model/migration/src/main.rs similarity index 52% rename from ext_calckey_model/migration/src/main.rs rename to ext_model/migration/src/main.rs index e315af3..1ef6bef 100644 --- a/ext_calckey_model/migration/src/main.rs +++ b/ext_model/migration/src/main.rs @@ -2,5 +2,5 @@ use sea_orm_migration::prelude::*; #[tokio::main] async fn main() { - cli::run_cli(ext_calckey_model_migration::Migrator).await; + cli::run_cli(ext_model_migration::Migrator).await; } diff --git a/ext_calckey_model/src/emoji.rs b/ext_model/src/emoji.rs similarity index 100% rename from ext_calckey_model/src/emoji.rs rename to ext_model/src/emoji.rs diff --git a/ext_calckey_model/src/lib.rs b/ext_model/src/lib.rs similarity index 99% rename from ext_calckey_model/src/lib.rs rename to ext_model/src/lib.rs index 526fda9..e228fb8 100644 --- a/ext_calckey_model/src/lib.rs +++ b/ext_model/src/lib.rs @@ -15,10 +15,10 @@ use crate::model_ext::IdShape; use crate::note_model::NoteResolver; use crate::notification_model::NotificationResolver; use chrono::Utc; -use ext_calckey_model_migration::{Migrator, MigratorTrait}; +use ext_model_migration::{Migrator, MigratorTrait}; use futures_util::StreamExt; use redis::IntoConnectionInfo; -use sea_orm::ActiveValue::Set; +use sea_orm::{ActiveValue::Set, ConnectionTrait}; use sea_orm::{ ColumnTrait, ConnectOptions, DatabaseConnection, DbErr, EntityTrait, QueryFilter, TransactionTrait, diff --git a/ext_calckey_model/src/model_ext.rs b/ext_model/src/model_ext.rs similarity index 98% rename from ext_calckey_model/src/model_ext.rs rename to ext_model/src/model_ext.rs index 3c966be..a9371b6 100644 --- a/ext_calckey_model/src/model_ext.rs +++ b/ext_model/src/model_ext.rs @@ -1,7 +1,5 @@ use chrono::{DateTime, Utc}; -use ext_calckey_model_migration::{ - Alias, Expr, IntoIden, Quote, SelectExpr, SelectStatement, TableRef, -}; +use ext_model_migration::{Alias, Expr, IntoIden, Quote, SelectExpr, SelectStatement, TableRef}; use magnetar_sdk::types::SpanFilter; use sea_orm::{ ColumnTrait, Condition, ConnectionTrait, Cursor, DbErr, DynIden, EntityTrait, FromQueryResult, diff --git a/ext_calckey_model/src/note_model/data.rs b/ext_model/src/note_model/data.rs similarity index 100% rename from ext_calckey_model/src/note_model/data.rs rename to ext_model/src/note_model/data.rs diff --git a/ext_calckey_model/src/note_model/mod.rs b/ext_model/src/note_model/mod.rs similarity index 99% rename from ext_calckey_model/src/note_model/mod.rs rename to ext_model/src/note_model/mod.rs index 2dceb11..2fce228 100644 --- a/ext_calckey_model/src/note_model/mod.rs +++ b/ext_model/src/note_model/mod.rs @@ -1,6 +1,6 @@ pub mod data; -use ext_calckey_model_migration::SelectStatement; +use ext_model_migration::SelectStatement; use sea_orm::sea_query::{Asterisk, Expr, IntoIden, Query, SelectExpr, SimpleExpr}; use sea_orm::{ Condition, EntityTrait, Iden, JoinType, QueryFilter, QueryOrder, QuerySelect, QueryTrait, diff --git a/ext_calckey_model/src/notification_model.rs b/ext_model/src/notification_model.rs similarity index 99% rename from ext_calckey_model/src/notification_model.rs rename to ext_model/src/notification_model.rs index 07a1974..2a88c75 100644 --- a/ext_calckey_model/src/notification_model.rs +++ b/ext_model/src/notification_model.rs @@ -9,7 +9,7 @@ use crate::{CalckeyDbError, CalckeyModel}; use chrono::{DateTime, Utc}; use ck::sea_orm_active_enums::NotificationTypeEnum; use ck::{access_token, notification, user}; -use ext_calckey_model_migration::{JoinType, SelectStatement}; +use ext_model_migration::{JoinType, SelectStatement}; use magnetar_sdk::types::SpanFilter; use sea_orm::prelude::Expr; use sea_orm::sea_query::{IntoCondition, Query}; diff --git a/ext_calckey_model/src/poll.rs b/ext_model/src/poll.rs similarity index 100% rename from ext_calckey_model/src/poll.rs rename to ext_model/src/poll.rs diff --git a/ext_calckey_model/src/user_model.rs b/ext_model/src/user_model.rs similarity index 99% rename from ext_calckey_model/src/user_model.rs rename to ext_model/src/user_model.rs index 5682e0f..c7551f0 100644 --- a/ext_calckey_model/src/user_model.rs +++ b/ext_model/src/user_model.rs @@ -4,7 +4,7 @@ use crate::model_ext::{ use crate::{model_ext::SelectColumnsExt, CalckeyDbError, CalckeyModel}; use chrono::{DateTime, Utc}; use ck::{drive_file, follow_request, following, user, user_profile}; -use ext_calckey_model_migration::{IntoIden, SelectStatement}; +use ext_model_migration::{IntoIden, SelectStatement}; use magnetar_sdk::types::SpanFilter; use sea_orm::{ ColumnTrait, DbErr, EntityTrait, FromQueryResult, Iden, JoinType, QueryFilter, QueryResult, diff --git a/src/api_v1/streaming.rs b/src/api_v1/streaming.rs index b69fa6c..0d2f8e3 100644 --- a/src/api_v1/streaming.rs +++ b/src/api_v1/streaming.rs @@ -8,8 +8,8 @@ use axum::response::sse::{Event, KeepAlive}; use axum::response::Sse; use futures::Stream; use futures_util::StreamExt as _; -use magnetar_calckey_model::model_ext::IdShape; -use magnetar_calckey_model::{CalckeySub, MainStreamMessage, SubMessage}; +use magnetar_model::model_ext::IdShape; +use magnetar_model::{CalckeySub, MainStreamMessage, SubMessage}; use magnetar_sdk::types::streaming::ChannelEvent; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; diff --git a/src/main.rs b/src/main.rs index a6da7bf..40a08bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,7 @@ use crate::service::MagnetarService; use axum::routing::get; use axum::Router; use dotenvy::dotenv; -use magnetar_calckey_model::{CacheConnectorConfig, CalckeyCache, CalckeyModel, ConnectorConfig}; +use magnetar_model::{CacheConnectorConfig, CalckeyCache, CalckeyModel, ConnectorConfig}; use miette::{miette, IntoDiagnostic}; use std::net::SocketAddr; use std::sync::Arc; diff --git a/src/model/data/drive.rs b/src/model/data/drive.rs index 6742f64..0fbcbe2 100644 --- a/src/model/data/drive.rs +++ b/src/model/data/drive.rs @@ -1,4 +1,4 @@ -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::drive::{DriveFileBase, ImageMeta}; use serde::Deserialize; use url::Url; diff --git a/src/model/data/emoji.rs b/src/model/data/emoji.rs index 0d24e5f..7a480cb 100644 --- a/src/model/data/emoji.rs +++ b/src/model/data/emoji.rs @@ -1,5 +1,5 @@ use crate::model::{PackType, PackingContext}; -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::emoji::EmojiBase; impl PackType<&ck::emoji::Model> for EmojiBase { diff --git a/src/model/data/id.rs b/src/model/data/id.rs index c132fe2..bc74651 100644 --- a/src/model/data/id.rs +++ b/src/model/data/id.rs @@ -1,4 +1,4 @@ -use magnetar_calckey_model::ck; +use magnetar_model::ck; pub trait BaseId: 'static { fn get_id(&self) -> &str; diff --git a/src/model/data/instance.rs b/src/model/data/instance.rs index d74a00f..6c47205 100644 --- a/src/model/data/instance.rs +++ b/src/model/data/instance.rs @@ -1,5 +1,5 @@ use crate::model::{PackType, PackingContext}; -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::instance::InstanceTicker; impl<'a> PackType<&'a ck::instance::Model> for InstanceTicker { diff --git a/src/model/data/note.rs b/src/model/data/note.rs index 41ce552..ab71b7e 100644 --- a/src/model/data/note.rs +++ b/src/model/data/note.rs @@ -1,5 +1,5 @@ -use magnetar_calckey_model::ck; -use magnetar_calckey_model::note_model::data::sub_interaction_renote; +use magnetar_model::ck; +use magnetar_model::note_model::data::sub_interaction_renote; use magnetar_sdk::types::note::{ NoteDetailExt, NoteSelfContextExt, PackNoteMaybeFull, PackPollBase, ReactionPair, }; diff --git a/src/model/data/notification.rs b/src/model/data/notification.rs index 834e80e..85c553b 100644 --- a/src/model/data/notification.rs +++ b/src/model/data/notification.rs @@ -1,5 +1,5 @@ use crate::model::{PackType, PackingContext}; -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::note::{PackNoteMaybeFull, Reaction}; use magnetar_sdk::types::notification::{ NotificationAppExt, NotificationBase, NotificationNoteExt, NotificationReactionExt, diff --git a/src/model/data/poll.rs b/src/model/data/poll.rs index 495b466..0e75d65 100644 --- a/src/model/data/poll.rs +++ b/src/model/data/poll.rs @@ -1,6 +1,6 @@ use crate::model::{PackType, PackingContext}; use chrono::{DateTime, Utc}; -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::note::{PollBase, PollChoice}; pub type PollPackInput<'a> = (&'a ck::poll::Model, Option<&'a [ck::poll_vote::Model]>); diff --git a/src/model/data/user.rs b/src/model/data/user.rs index 3ad06c5..fb2977c 100644 --- a/src/model/data/user.rs +++ b/src/model/data/user.rs @@ -1,5 +1,5 @@ -use magnetar_calckey_model::ck; -use magnetar_calckey_model::ck::sea_orm_active_enums::UserProfileFfvisibilityEnum; +use magnetar_model::ck; +use magnetar_model::ck::sea_orm_active_enums::UserProfileFfvisibilityEnum; use magnetar_sdk::types::drive::PackDriveFileBase; use magnetar_sdk::types::emoji::{EmojiContext, PackEmojiBase}; use magnetar_sdk::types::instance::InstanceTicker; diff --git a/src/model/mod.rs b/src/model/mod.rs index 113374f..f31a618 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -2,7 +2,7 @@ use crate::model::data::id::BaseId; use crate::model::processing::PackResult; use crate::service::MagnetarService; use either::Either; -use magnetar_calckey_model::{ck, CalckeyDbError}; +use magnetar_model::{ck, CalckeyDbError}; use magnetar_sdk::types::user::UserRelationship; use std::collections::HashMap; use std::sync::Arc; diff --git a/src/model/processing/drive.rs b/src/model/processing/drive.rs index aedc101..b305752 100644 --- a/src/model/processing/drive.rs +++ b/src/model/processing/drive.rs @@ -1,7 +1,7 @@ use crate::model::data::drive::PackFileBaseInput; use crate::model::processing::PackResult; use crate::model::{PackType, PackingContext}; -use magnetar_calckey_model::ck; +use magnetar_model::ck; use magnetar_sdk::types::drive::{DriveFileBase, PackDriveFileBase}; use magnetar_sdk::types::Id; use magnetar_sdk::{Packed, Required}; diff --git a/src/model/processing/emoji.rs b/src/model/processing/emoji.rs index 169e442..e7d5382 100644 --- a/src/model/processing/emoji.rs +++ b/src/model/processing/emoji.rs @@ -3,9 +3,9 @@ use crate::model::{PackType, PackingContext}; use either::Either; use futures_util::TryFutureExt; use itertools::Itertools; -use magnetar_calckey_model::ck; -use magnetar_calckey_model::emoji::EmojiTag; use magnetar_common::util::{parse_reaction, RawReaction}; +use magnetar_model::ck; +use magnetar_model::emoji::EmojiTag; use magnetar_sdk::types::emoji::{EmojiBase, PackEmojiBase}; use magnetar_sdk::types::note::{Reaction, ReactionShortcode, ReactionUnicode, ReactionUnknown}; use magnetar_sdk::types::Id; diff --git a/src/model/processing/mod.rs b/src/model/processing/mod.rs index 7a965ba..f2220fe 100644 --- a/src/model/processing/mod.rs +++ b/src/model/processing/mod.rs @@ -2,8 +2,8 @@ use crate::service::emoji_cache::EmojiCacheError; use crate::service::generic_id_cache::GenericIdCacheError; use crate::service::instance_cache::RemoteInstanceCacheError; use crate::service::instance_meta_cache::InstanceMetaCacheError; -use magnetar_calckey_model::sea_orm::DbErr; -use magnetar_calckey_model::CalckeyDbError; +use magnetar_model::sea_orm::DbErr; +use magnetar_model::CalckeyDbError; use magnetar_sdk::mmm::Token; use thiserror::Error; diff --git a/src/model/processing/note.rs b/src/model/processing/note.rs index e3fa810..b2edfb4 100644 --- a/src/model/processing/note.rs +++ b/src/model/processing/note.rs @@ -8,17 +8,17 @@ use compact_str::CompactString; use either::Either; use futures_util::future::try_join_all; use futures_util::{FutureExt, StreamExt, TryStreamExt}; -use magnetar_calckey_model::ck::sea_orm_active_enums::NoteVisibilityEnum; -use magnetar_calckey_model::model_ext::AliasColumnExt; -use magnetar_calckey_model::note_model::data::{ +use magnetar_model::ck::sea_orm_active_enums::NoteVisibilityEnum; +use magnetar_model::model_ext::AliasColumnExt; +use magnetar_model::note_model::data::{ sub_interaction_reaction, sub_interaction_renote, NoteData, }; -use magnetar_calckey_model::note_model::{NoteResolveOptions, NoteVisibilityFilterFactory}; -use magnetar_calckey_model::poll::PollResolver; -use magnetar_calckey_model::sea_orm::sea_query::{PgFunc, Query, SimpleExpr}; -use magnetar_calckey_model::sea_orm::{ActiveEnum, ColumnTrait, Iden, IntoSimpleExpr}; -use magnetar_calckey_model::user_model::UserResolveOptions; -use magnetar_calckey_model::{ck, CalckeyDbError}; +use magnetar_model::note_model::{NoteResolveOptions, NoteVisibilityFilterFactory}; +use magnetar_model::poll::PollResolver; +use magnetar_model::sea_orm::sea_query::{PgFunc, Query, SimpleExpr}; +use magnetar_model::sea_orm::{ActiveEnum, ColumnTrait, Iden, IntoSimpleExpr}; +use magnetar_model::user_model::UserResolveOptions; +use magnetar_model::{ck, CalckeyDbError}; use magnetar_sdk::mmm::Token; use magnetar_sdk::types::drive::PackDriveFileBase; use magnetar_sdk::types::emoji::EmojiContext; diff --git a/src/model/processing/notification.rs b/src/model/processing/notification.rs index 7e69e40..56a0143 100644 --- a/src/model/processing/notification.rs +++ b/src/model/processing/notification.rs @@ -6,11 +6,11 @@ use crate::model::processing::{PackError, PackResult}; use crate::model::{PackType, PackingContext}; use crate::web::pagination::Pagination; use futures_util::{StreamExt, TryStreamExt}; -use magnetar_calckey_model::ck; -use magnetar_calckey_model::ck::sea_orm_active_enums::NotificationTypeEnum; -use magnetar_calckey_model::note_model::NoteResolveOptions; -use magnetar_calckey_model::notification_model::{NotificationData, NotificationResolveOptions}; -use magnetar_calckey_model::user_model::UserResolveOptions; +use magnetar_model::ck; +use magnetar_model::ck::sea_orm_active_enums::NotificationTypeEnum; +use magnetar_model::note_model::NoteResolveOptions; +use magnetar_model::notification_model::{NotificationData, NotificationResolveOptions}; +use magnetar_model::user_model::UserResolveOptions; use magnetar_sdk::types::notification::{ NotificationAppExt, NotificationBase, NotificationNoteExt, NotificationReactionExt, NotificationType, NotificationUserExt, PackNotification, PackNotificationApp, diff --git a/src/model/processing/user.rs b/src/model/processing/user.rs index 9a597af..a1d53a0 100644 --- a/src/model/processing/user.rs +++ b/src/model/processing/user.rs @@ -9,9 +9,9 @@ use crate::web::{AccessForbidden, ApiError}; use either::Either; use futures_util::future::OptionFuture; use futures_util::{StreamExt, TryStreamExt}; -use magnetar_calckey_model::ck; -use magnetar_calckey_model::ck::sea_orm_active_enums::UserProfileFfvisibilityEnum; -use magnetar_calckey_model::user_model::{UserData, UserResolveOptions}; +use magnetar_model::ck; +use magnetar_model::ck::sea_orm_active_enums::UserProfileFfvisibilityEnum; +use magnetar_model::user_model::{UserData, UserResolveOptions}; use magnetar_sdk::endpoints::user::{UserByIdReq, UserSelfReq}; use magnetar_sdk::mmm::Token; use magnetar_sdk::types::drive::PackDriveFileBase; diff --git a/src/service/emoji_cache.rs b/src/service/emoji_cache.rs index c266486..2a8ebcc 100644 --- a/src/service/emoji_cache.rs +++ b/src/service/emoji_cache.rs @@ -1,7 +1,7 @@ use crate::web::ApiError; use lru::LruCache; -use magnetar_calckey_model::emoji::{EmojiResolver, EmojiTag}; -use magnetar_calckey_model::{ck, CalckeyDbError, CalckeyModel}; +use magnetar_model::emoji::{EmojiResolver, EmojiTag}; +use magnetar_model::{ck, CalckeyDbError, CalckeyModel}; use std::collections::HashSet; use std::sync::Arc; use strum::EnumVariantNames; diff --git a/src/service/generic_id_cache.rs b/src/service/generic_id_cache.rs index c4df02b..f77748f 100644 --- a/src/service/generic_id_cache.rs +++ b/src/service/generic_id_cache.rs @@ -1,7 +1,7 @@ use crate::web::ApiError; use lru::LruCache; -use magnetar_calckey_model::sea_orm::{EntityTrait, PrimaryKeyTrait}; -use magnetar_calckey_model::{CalckeyDbError, CalckeyModel}; +use magnetar_model::sea_orm::{EntityTrait, PrimaryKeyTrait}; +use magnetar_model::{CalckeyDbError, CalckeyModel}; use std::marker::PhantomData; use std::sync::Arc; use std::time::{Duration, Instant}; diff --git a/src/service/instance_cache.rs b/src/service/instance_cache.rs index 879a1f8..b667609 100644 --- a/src/service/instance_cache.rs +++ b/src/service/instance_cache.rs @@ -1,7 +1,7 @@ use crate::web::ApiError; use lru::LruCache; -use magnetar_calckey_model::{ck, CalckeyDbError, CalckeyModel}; use magnetar_common::config::MagnetarConfig; +use magnetar_model::{ck, CalckeyDbError, CalckeyModel}; use std::sync::Arc; use std::time::{Duration, Instant}; use strum::EnumVariantNames; diff --git a/src/service/instance_meta_cache.rs b/src/service/instance_meta_cache.rs index 437b4dd..10815cb 100644 --- a/src/service/instance_meta_cache.rs +++ b/src/service/instance_meta_cache.rs @@ -1,5 +1,5 @@ use crate::web::ApiError; -use magnetar_calckey_model::{ck, CalckeyDbError, CalckeyModel}; +use magnetar_model::{ck, CalckeyDbError, CalckeyModel}; use std::sync::Arc; use std::time::{Duration, Instant}; use strum::EnumVariantNames; diff --git a/src/service/local_user_cache.rs b/src/service/local_user_cache.rs index 571323e..b435e05 100644 --- a/src/service/local_user_cache.rs +++ b/src/service/local_user_cache.rs @@ -1,10 +1,10 @@ use crate::web::ApiError; use cached::{Cached, TimedCache}; -use magnetar_calckey_model::{ +use magnetar_common::config::MagnetarConfig; +use magnetar_model::{ ck, CalckeyCache, CalckeyCacheError, CalckeyDbError, CalckeyModel, CalckeySub, InternalStreamMessage, SubMessage, }; -use magnetar_common::config::MagnetarConfig; use std::collections::HashMap; use std::sync::Arc; use strum::EnumVariantNames; diff --git a/src/service/mod.rs b/src/service/mod.rs index d66aa05..0ff5683 100644 --- a/src/service/mod.rs +++ b/src/service/mod.rs @@ -1,5 +1,5 @@ -use magnetar_calckey_model::{ck, CalckeyCache, CalckeyModel}; use magnetar_common::config::MagnetarConfig; +use magnetar_model::{ck, CalckeyCache, CalckeyModel}; use std::fmt::{Debug, Formatter}; use std::time::Duration; use thiserror::Error; diff --git a/src/web/auth.rs b/src/web/auth.rs index 3253e4e..dcf4efc 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -10,7 +10,7 @@ use axum::middleware::Next; use axum::response::{IntoResponse, Response}; use headers::authorization::Bearer; use headers::{Authorization, HeaderMapExt}; -use magnetar_calckey_model::{ck, CalckeyDbError}; +use magnetar_model::{ck, CalckeyDbError}; use std::convert::Infallible; use std::sync::Arc; use strum::IntoStaticStr; diff --git a/src/web/mod.rs b/src/web/mod.rs index db44b6e..4a40641 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -2,8 +2,8 @@ use crate::model::processing::PackError; use axum::http::StatusCode; use axum::response::{IntoResponse, Response}; use axum::Json; -use magnetar_calckey_model::{CalckeyCacheError, CalckeyDbError}; use magnetar_common::util::FediverseTagParseError; +use magnetar_model::{CalckeyCacheError, CalckeyDbError}; use serde::Serialize; use serde_json::json; use std::fmt::{Display, Formatter}; diff --git a/src/web/pagination.rs b/src/web/pagination.rs index 3ba1a65..372e7f7 100644 --- a/src/web/pagination.rs +++ b/src/web/pagination.rs @@ -10,8 +10,8 @@ use axum::response::{IntoResponse, IntoResponseParts, Response, ResponseParts}; use axum::RequestPartsExt; use either::Either; use itertools::Itertools; -use magnetar_calckey_model::sea_orm::prelude::async_trait::async_trait; use magnetar_core::web_model::rel::{RelNext, RelPrev}; +use magnetar_model::sea_orm::prelude::async_trait::async_trait; use magnetar_sdk::types::{PaginationShape, SpanFilter}; use magnetar_sdk::util_types::U64Range; use serde::{Deserialize, Serialize}; diff --git a/src/webfinger.rs b/src/webfinger.rs index 5427bd7..ff7e5eb 100644 --- a/src/webfinger.rs +++ b/src/webfinger.rs @@ -3,7 +3,6 @@ use axum::http::StatusCode; use axum::response::IntoResponse; use axum::Json; use hyper::header; -use magnetar_calckey_model::CalckeyModel; use magnetar_common::config::MagnetarConfig; use magnetar_common::util::{lenient_parse_acct_decode, FediverseTag}; use magnetar_core::web_model::acct::Acct; @@ -11,6 +10,7 @@ use magnetar_core::web_model::content_type::{ ContentActivityJson, ContentActivityStreams, ContentHtml, ContentJrdJson, }; use magnetar_core::web_model::rel::{RelOStatusSubscribe, RelSelf, RelWebFingerProfilePage}; +use magnetar_model::CalckeyModel; use magnetar_webfinger::webfinger::{WebFinger, WebFingerRel, WebFingerSubject}; use serde::Deserialize; use tracing::error;