I just want to get user by id but I got an error that states id does not exist on type string , my code is shown below:
import asyncHandler from...
For further actions, you may consider blocking this person and/or reporting abuse
I had this same issue about a few minutes ago.
The error occurs because the type of the "verified" variable is not specified; Hence it is 'string | JwtPayload'.
So I solved the error by specifying the type to be "JwtPayload". I.e
became
With Bug
Fixed bug
I added id: string; to the jwtpayload but still got same error, code shown below: