Skip to content

Commit 2d0b587

Browse files
committed
consider Jwt struct singular
1 parent 027b32d commit 2d0b587

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

domain/src/jwt/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! ```
2525
2626
use crate::error::{DomainErrorKind, Error, InternalErrorKind};
27-
use crate::{coaching_session, jwts::Jwts, Id};
27+
use crate::{coaching_session, jwts::Jwt, Id};
2828
use claims::TiptapCollabClaims;
2929
use jsonwebtoken::{encode, EncodingKey, Header};
3030
use log::*;
@@ -43,7 +43,7 @@ pub async fn generate_collab_token(
4343
db: &DatabaseConnection,
4444
config: &Config,
4545
coaching_session_id: Id,
46-
) -> Result<Jwts, Error> {
46+
) -> Result<Jwt, Error> {
4747
let coaching_session = coaching_session::find_by_id(db, coaching_session_id).await?;
4848

4949
let collab_document_name = coaching_session.collab_document_name.ok_or_else(|| {
@@ -101,7 +101,7 @@ pub async fn generate_collab_token(
101101
&EncodingKey::from_secret(tiptap_jwt_signing_key.as_bytes()),
102102
)?;
103103

104-
Ok(Jwts {
104+
Ok(Jwt {
105105
token,
106106
sub: collab_document_name,
107107
})

entity/src/jwts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use utoipa::ToSchema;
1111
/// the subject without having to decode the JWT.
1212
#[derive(Serialize, Debug, ToSchema)]
1313
#[schema(as = jwt::Jwt)] // OpenAPI schema
14-
pub struct Jwts {
14+
pub struct Jwt {
1515
pub token: String,
1616
pub sub: String,
1717
}

0 commit comments

Comments
 (0)