File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 24
24
//! ```
25
25
26
26
use crate :: error:: { DomainErrorKind , Error , InternalErrorKind } ;
27
- use crate :: { coaching_session, jwts:: Jwts , Id } ;
27
+ use crate :: { coaching_session, jwts:: Jwt , Id } ;
28
28
use claims:: TiptapCollabClaims ;
29
29
use jsonwebtoken:: { encode, EncodingKey , Header } ;
30
30
use log:: * ;
@@ -43,7 +43,7 @@ pub async fn generate_collab_token(
43
43
db : & DatabaseConnection ,
44
44
config : & Config ,
45
45
coaching_session_id : Id ,
46
- ) -> Result < Jwts , Error > {
46
+ ) -> Result < Jwt , Error > {
47
47
let coaching_session = coaching_session:: find_by_id ( db, coaching_session_id) . await ?;
48
48
49
49
let collab_document_name = coaching_session. collab_document_name . ok_or_else ( || {
@@ -101,7 +101,7 @@ pub async fn generate_collab_token(
101
101
& EncodingKey :: from_secret ( tiptap_jwt_signing_key. as_bytes ( ) ) ,
102
102
) ?;
103
103
104
- Ok ( Jwts {
104
+ Ok ( Jwt {
105
105
token,
106
106
sub : collab_document_name,
107
107
} )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use utoipa::ToSchema;
11
11
/// the subject without having to decode the JWT.
12
12
#[ derive( Serialize , Debug , ToSchema ) ]
13
13
#[ schema( as = jwt:: Jwt ) ] // OpenAPI schema
14
- pub struct Jwts {
14
+ pub struct Jwt {
15
15
pub token : String ,
16
16
pub sub : String ,
17
17
}
You can’t perform that action at this time.
0 commit comments