mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2439 from omnivore-app/fix/importer-email
fix: importer status update email not sent
This commit is contained in:
commit
442deead6e
2 changed files with 5 additions and 2 deletions
|
|
@ -17,7 +17,10 @@ export function userRouter() {
|
|||
|
||||
router.post('/email', cors<express.Request>(corsConfig), async (req, res) => {
|
||||
logger.info('email to-user router')
|
||||
const token = req?.cookies?.auth || req?.headers?.authorization
|
||||
const token =
|
||||
req.headers['Omnivore-Authorization'] ||
|
||||
req.cookies?.auth ||
|
||||
req.headers?.authorization
|
||||
const claims = await getClaimsByToken(token)
|
||||
if (!claims) {
|
||||
res.status(401).send('UNAUTHORIZED')
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ const createEmailCloudTask = async (userId: string, payload: unknown) => {
|
|||
process.env.JWT_SECRET
|
||||
)) as string
|
||||
const headers = {
|
||||
Cookie: `auth=${authToken}`,
|
||||
'Omnivore-Authorization': authToken,
|
||||
}
|
||||
|
||||
return createCloudTask(
|
||||
|
|
|
|||
Loading…
Reference in a new issue