File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,4 @@ coverage
41
41
42
42
/target
43
43
/Cargo.lock
44
- /apps /web /build.zip
45
- bun.lockb
44
+ /apps /web /build.zip
Original file line number Diff line number Diff line change 1
1
import { API_ERRORS , ApiError } from '@api'
2
2
import type { Nullable } from '@diary-spo/shared'
3
+ import { formatDate } from '@utils'
3
4
import { caching } from 'cache-manager'
5
+ import { authSaveUseDate } from 'src/models/Auth/actions/save'
4
6
import { AuthModel , type AuthModelType } from '../models/Auth'
5
7
import { DiaryUserModel , type DiaryUserModelType } from '../models/DiaryUser'
6
8
import { GroupModel , type GroupModelType } from '../models/Group'
7
9
import { SPOModel , type SPOModelType } from '../models/SPO'
8
- import { formatDate } from '@utils'
9
- import { authSaveUseDate } from 'src/models/Auth/actions/save'
10
10
11
11
const memoryCache = await caching ( 'memory' , {
12
12
max : 1000 ,
@@ -77,7 +77,7 @@ export const getCookieFromToken = async (
77
77
throw new ApiError ( API_ERRORS . INVALID_TOKEN , 401 )
78
78
}
79
79
80
- if ( diaryUserAuth . lastUsedDate !== formatDate ( new Date ( ) ) )
80
+ if ( diaryUserAuth . lastUsedDate !== formatDate ( new Date ( ) ) )
81
81
authSaveUseDate ( token , new Date ( ) )
82
82
83
83
const user = diaryUserAuth . diaryUser
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ export const authSaveUseDate = async (
5
5
token : string ,
6
6
date : Date
7
7
) : Promise < [ affectedCount : number ] > =>
8
- AuthModel . update ( {
9
- lastUsedDate : formatDate ( date )
10
- } ,
8
+ AuthModel . update (
9
+ {
10
+ lastUsedDate : formatDate ( date )
11
+ } ,
11
12
{
12
13
where : {
13
14
token
14
15
}
15
- } )
16
+ }
17
+ )
Original file line number Diff line number Diff line change 1
- export * from './authSaveUseDate'
1
+ export * from './authSaveUseDate'
You can’t perform that action at this time.
0 commit comments