(email: string)
| 143 | }; |
| 144 | |
| 145 | const createOrUpdateEmailUser = async (email: string) => { |
| 146 | const { createUser, getUserByEmail, updateUser } = getEmailAuthAdapter(); |
| 147 | const existingUser = await getUserByEmail(email); |
| 148 | |
| 149 | if (existingUser) { |
| 150 | return updateUser({ |
| 151 | id: existingUser.id, |
| 152 | emailVerified: new Date(), |
| 153 | }); |
| 154 | } |
| 155 | |
| 156 | return createUser({ |
| 157 | email, |
| 158 | emailVerified: new Date(), |
| 159 | image: null, |
| 160 | name: null, |
| 161 | }); |
| 162 | }; |
| 163 | |
| 164 | const parseBearerToken = (authorization: string | undefined) => { |
| 165 | if (!authorization) return null; |
no test coverage detected