Skip to content

Commit d6308bc

Browse files
committed
ref: move User to api::schema
This entity should be public
1 parent a7ee889 commit d6308bc

File tree

7 files changed

+8
-4
lines changed

7 files changed

+8
-4
lines changed

src/api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
pub mod request;
55
pub mod response;
6+
pub mod schema;
67
mod status;
78
mod token;
89

src/api/schema/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! Contains extensions to the [`winvoice_schema`] which are specific to the [server](crate).
2+
3+
mod user;
4+
5+
pub use user::User;
File renamed without changes.
File renamed without changes.

src/server/auth/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use axum_login::{extractors::AuthContext, SqlxStore};
44
use sqlx::Pool;
55

6-
use super::User;
6+
use crate::api::schema::User;
77

88
/// The [`AuthContext`] used by the [`winvoice_server::server`].
99
pub type Context<Db> = AuthContext<String, User, SqlxStore<Pool<Db>, User, String>, String>;

src/server/auth/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
33
mod context;
44
mod init_users_table;
5-
mod user;
65

76
pub use context::Context;
87
pub use init_users_table::InitUsersTable;
9-
pub use user::User;

src/server/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ mod clone;
55
use casbin::{CoreApi, Enforcer};
66
use sqlx::{Database, Pool};
77

8-
use super::auth::User;
98
use crate::{
9+
api::schema::User,
1010
lock::Lock,
1111
permissions::{Action, Object},
1212
};

0 commit comments

Comments
 (0)