Merge pull request #2496 from omnivore-app/fix/rss-invalid-request-body

fix invalid request body in rss handler
This commit is contained in:
Hongbo Wu 2023-07-17 18:14:37 +08:00 committed by GitHub
commit 65df023dd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,17 +8,13 @@ import { CONTENT_FETCH_URL, createCloudTask } from './task'
interface RssFeedRequest {
subscriptionId: string
userId: string
feedUrl: string
lastFetchedAt: string
}
function isRssFeedRequest(body: any): body is RssFeedRequest {
return (
'subscriptionId' in body &&
'userId' in body &&
'feedUrl' in body &&
'lastFetchedAt' in body
'subscriptionId' in body && 'feedUrl' in body && 'lastFetchedAt' in body
)
}