Merge pull request #3128 from omnivore-app/fix/save-following

item_id and saved_at are optional in the post request
This commit is contained in:
Hongbo Wu 2023-11-15 12:37:41 +08:00 committed by GitHub
commit 81f139e4fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ export interface SaveFollowingItemRequest {
userIds: string[]
title: string
url: string
itemId: string
itemId?: string
addedToFollowingBy: string
addedToFollowingFrom: SourceOfFollowing
author?: string
@ -18,7 +18,7 @@ export interface SaveFollowingItemRequest {
previewContent?: string
previewContentType?: string
publishedAt?: Date
savedAt: Date
savedAt?: Date
}
function isSaveFollowingItemRequest(
@ -29,9 +29,7 @@ function isSaveFollowingItemRequest(
'addedToFollowingBy' in body &&
'addedToFollowingFrom' in body &&
'url' in body &&
'itemId' in body &&
'title' in body &&
'savedAt' in body
'title' in body
)
}