(request: Request)
| 119 | } |
| 120 | |
| 121 | static async getDataFromRequest(request: Request): Promise<{ user: User } | null> { |
| 122 | const cookies = getCookies(request.headers); |
| 123 | |
| 124 | if (cookies[COOKIE_NAME]) { |
| 125 | const result = await this.getDataFromCookie(cookies[COOKIE_NAME]); |
| 126 | |
| 127 | if (result) { |
| 128 | return result; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | return null; |
| 133 | } |
| 134 | |
| 135 | private static async getDataFromCookie(cookieValue: string): Promise<{ user: User } | null> { |
| 136 | if (!cookieValue) { |
nothing calls this directly
no test coverage detected