File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "hash" : " 3c5196d98b6096d6dcb28beda5cf923b703ff18e399556d63feff0bbccf7038b " ,
2+ "hash" : " 7857db6094ee380aa977bf86bc580b86231b97c472b817ac92cb087680af653b " ,
33 "openapi" : " 3.0.0" ,
44 "paths" : {
55 "/hello" : {
23362336 }
23372337 },
23382338 {
2339- "name" : " oneTimeUse " ,
2339+ "name" : " noRotate " ,
23402340 "required" : false ,
23412341 "in" : " query" ,
2342- "description" : " 一次性的, 禁止轮换" ,
2342+ "description" : " 禁止轮换" ,
23432343 "schema" : {
23442344 "type" : " boolean"
23452345 }
25092509 }
25102510 },
25112511 {
2512- "name" : " oneTimeUse " ,
2512+ "name" : " noRotate " ,
25132513 "required" : false ,
25142514 "in" : " query" ,
2515- "description" : " 一次性的, 禁止轮换" ,
2515+ "description" : " 禁止轮换" ,
25162516 "schema" : {
25172517 "type" : " boolean"
25182518 }
55835583 "type" : " string" ,
55845584 "description" : " 用户类型"
55855585 },
5586- "oneTimeUse " : {
5586+ "noRotate " : {
55875587 "type" : " boolean" ,
5588- "description" : " 一次性的, 禁止轮换"
5588+ "description" : " 禁止轮换"
55895589 },
55905590 "remark" : {
55915591 "type" : " string" ,
68686868 "type" : " string" ,
68696869 "description" : " 用户类型"
68706870 },
6871- "oneTimeUse " : {
6871+ "noRotate " : {
68726872 "type" : " boolean" ,
6873- "description" : " 一次性的, 禁止轮换"
6873+ "description" : " 禁止轮换"
68746874 },
68756875 "remark" : {
68766876 "type" : " string" ,
69316931 "type" : " string" ,
69326932 "description" : " 用户类型"
69336933 },
6934- "oneTimeUse " : {
6934+ "noRotate " : {
69356935 "type" : " boolean" ,
6936- "description" : " 一次性的, 禁止轮换"
6936+ "description" : " 禁止轮换"
69376937 },
69386938 "remark" : {
69396939 "type" : " string" ,
70147014 "type" : " string" ,
70157015 "description" : " 用户类型"
70167016 },
7017- "oneTimeUse " : {
7017+ "noRotate " : {
70187018 "type" : " boolean" ,
7019- "description" : " 一次性的, 禁止轮换"
7019+ "description" : " 禁止轮换"
70207020 },
70217021 "remark" : {
70227022 "type" : " string" ,
84428442 "type" : " string" ,
84438443 "description" : " 用户类型"
84448444 },
8445- "oneTimeUse " : {
8445+ "noRotate " : {
84468446 "type" : " boolean" ,
8447- "description" : " 一次性的, 禁止轮换"
8447+ "description" : " 禁止轮换"
84488448 },
84498449 "remark" : {
84508450 "type" : " string" ,
Original file line number Diff line number Diff line change @@ -86,12 +86,12 @@ export class SessionDoc {
8686 type ?: string ;
8787
8888 /**
89- * 一次性的, 禁止轮换
89+ * 禁止轮换
9090 */
9191 @IsOptional ( )
9292 @IsBoolean ( )
9393 @Prop ( )
94- oneTimeUse ?: boolean ;
94+ noRotate ?: boolean ;
9595
9696 /**
9797 * 备注
@@ -111,7 +111,7 @@ class SessionDocMethods {
111111 */
112112 shouldRotate ( ) {
113113 const self = this as any as SessionDocument ;
114- if ( self . oneTimeUse ) return false ; // 一次性的 session 不需要轮换
114+ if ( self . noRotate ) return false ;
115115 const duration = self . expireAt . getTime ( ) - self . createdAt ?. getTime ( ) ;
116116 const left = self . expireAt . getTime ( ) - Date . now ( ) ;
117117 return left < duration / 5 ;
You can’t perform that action at this time.
0 commit comments