Skip to content

Commit

Permalink
fix(server): use TownHall core auth over in-situ
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Jun 8, 2024
1 parent cc3e2f9 commit 193fb63
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 118 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ use lazy_static::lazy_static;
use pxid::Factory;

lazy_static! {
static ref PXID_GENERATOR: Factory = { Factory::new().expect("Failed to create Pxid factory") };
static ref PXID_GENERATOR: Factory = Factory::new().expect("Failed to create Pxid factory");
}
4 changes: 2 additions & 2 deletions crates/server/src/graphql/modules/auth/query/me.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use async_graphql::{Context, Result, SimpleObject};
use serde::{Deserialize, Serialize};

use crate::context::SharedContext;
use townhall::auth::service::Token;

use crate::context::SharedContext;
use crate::graphql::modules::auth::types::{AuthError, AuthErrorCode};
use crate::graphql::modules::user::types::User;
use crate::services::auth::Token;

#[derive(Debug, Default, Deserialize, Serialize, SimpleObject)]
pub struct Me {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use async_graphql::{Context, Result, SimpleObject};
use serde::{Deserialize, Serialize};
use tracing::instrument;

use townhall::auth::service::Token;
use townhall::user::service::UploadAvatarDto;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
use crate::services::auth::Token;

#[derive(Debug, Default, Deserialize, Serialize, SimpleObject)]
pub struct UserAvatarUpdate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use async_graphql::{Context, Result, SimpleObject};
use pxid::Pxid;
use serde::{Deserialize, Serialize};

use townhall::auth::service::Token;
use townhall::user::service::FollowPeers;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
use crate::services::auth::Token;

#[derive(Debug, Default, Deserialize, Serialize, SimpleObject)]
pub struct UserFollow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use async_graphql::{Context, Result, SimpleObject};
use pxid::Pxid;
use serde::{Deserialize, Serialize};

use townhall::auth::service::Token;
use townhall::user::service::FollowPeers;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
use crate::services::auth::Token;

#[derive(Debug, Default, Deserialize, Serialize, SimpleObject)]
pub struct UserUnfollow {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use async_graphql::{Context, InputObject, Result, SimpleObject};
use serde::{Deserialize, Serialize};

use townhall::auth::service::Token;
use townhall::user::repository::user::UpdateUserDto;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{User, UserError, UserErrorCode};
use crate::services::auth::Token;

#[derive(Debug, Default, InputObject)]
pub struct UserUpdateInput {
Expand Down
110 changes: 0 additions & 110 deletions crates/server/src/services/auth.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/server/src/services/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod auth;
pub mod image;

use std::sync::Arc;
Expand Down

0 comments on commit 193fb63

Please sign in to comment.