fix invalid request body in rss handler

This commit is contained in:
Hongbo Wu
2023-07-17 18:14:15 +08:00
parent 44c9bfce48
commit 896b03a4db

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
)
}