@@ -12,11 +12,11 @@ export const accessKeysRouter = express.Router();
1212accessKeysRouter . get ( '/' , checkToken , ( req : Req , res , next ) => {
1313 const { logger } = req ;
1414 const uid = req . users . id ;
15- logger . info ( 'try get acceesKeys ' , { uid } ) ;
15+ logger . info ( 'try get accessKeys ' , { uid } ) ;
1616 accountManager
1717 . getAllAccessKeyByUid ( uid )
1818 . then ( ( accessKeys ) => {
19- logger . info ( 'get acceesKeys success' , { uid } ) ;
19+ logger . info ( 'get accessKeys success' , { uid } ) ;
2020 res . send ( { accessKeys } ) ;
2121 } )
2222 . catch ( ( e ) => {
@@ -44,15 +44,16 @@ accessKeysRouter.post(
4444 const uid = req . users . id ;
4545 const createdBy = _ . trim ( body . createdBy ) ;
4646 const friendlyName = _ . trim ( body . friendlyName ) ;
47- const ttl = parseInt ( body . ttl , 10 ) ;
47+ // TODO: 엑세스토큰 만료일을 수정하고 싶은 경우 tokens.pug 에서 전송되는 ttl을 수정
48+ const ttl = parseInt ( body . ttl , 10 ) ; // 현재 호출부 기본값 30일 = 60*60*24*30*1000
4849 const description = _ . trim ( body . description ) ;
4950 logger . info ( 'try to generate access key' , {
5051 uid,
5152 name : friendlyName ,
5253 body : JSON . stringify ( body ) ,
5354 } ) ;
5455 return accountManager
55- . isExsitAccessKeyName ( uid , friendlyName )
56+ . isExistAccessKeyName ( uid , friendlyName )
5657 . then ( ( data ) => {
5758 if ( ! _ . isEmpty ( data ) ) {
5859 throw new AppError ( `The access key "${ friendlyName } " already exists.` ) ;
0 commit comments