File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
packages/velog-server/src/common/plugins/global Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { container } from 'tsyringe'
5
5
import { UserService } from '@services/UserService/index.js'
6
6
import { CookieService } from '@lib/cookie/CookieService.js'
7
7
import { Time } from '@constants/TimeConstants.js'
8
- import { DbService } from '@lib/db/DbService'
9
8
10
9
const authPlugin : FastifyPluginAsync = async ( fastify ) => {
11
10
fastify . decorateRequest ( 'user' , null )
@@ -36,13 +35,13 @@ const authPlugin: FastifyPluginAsync = async (fastify) => {
36
35
await userService . restoreToken ( { request, reply } )
37
36
}
38
37
39
- const user = await userService . findById ( accessTokenData . user_id )
38
+ // const user = await userService.findById(accessTokenData.user_id)
40
39
41
- if ( ! user ) {
42
- cookie . clearCookie ( reply , 'access_token' )
43
- cookie . clearCookie ( reply , 'refresh_token' )
44
- throw new Error ( 'User not found' )
45
- }
40
+ // if (!user) {
41
+ // cookie.clearCookie(reply, 'access_token')
42
+ // cookie.clearCookie(reply, 'refresh_token')
43
+ // throw new Error('User not found')
44
+ // }
46
45
47
46
request . user = { id : accessTokenData . user_id }
48
47
return
You can’t perform that action at this time.
0 commit comments