File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/velog-server/src/services/UserService Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,18 @@ export class UserService implements Service {
122
122
123
123
public async updateLastAccessedAt ( userId ?: string ) : Promise < void > {
124
124
if ( ! userId ) return
125
- await this . db . userProfile . update ( {
126
- where : {
127
- fk_user_id : userId ,
128
- } ,
129
- data : {
130
- last_accessed_at : this . utils . now ,
131
- } ,
132
- } )
125
+ try {
126
+ await this . db . userProfile . update ( {
127
+ where : {
128
+ fk_user_id : userId ,
129
+ } ,
130
+ data : {
131
+ last_accessed_at : this . utils . now ,
132
+ } ,
133
+ } )
134
+ } catch ( error ) {
135
+ console . error ( 'updateLastAccessedAt error' , error )
136
+ }
133
137
}
134
138
public async restoreToken ( ctx : Pick < GraphQLContext , 'request' | 'reply' > ) : Promise < UserToken > {
135
139
const refreshToken : string | undefined = ctx . request . cookies [ 'refresh_token' ]
You can’t perform that action at this time.
0 commit comments