mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3421 from omnivore-app/fix/title
fix: do not throw error if title is undefined in cache
This commit is contained in:
commit
47da6fb3dc
2 changed files with 2 additions and 17 deletions
|
|
@ -58,16 +58,6 @@ interface CreateArticleResponse {
|
|||
}
|
||||
}
|
||||
|
||||
interface SavePageResponse {
|
||||
data: {
|
||||
savePage: {
|
||||
url: string
|
||||
clientRequestId: string
|
||||
errorCodes?: string[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface FetchResult {
|
||||
finalUrl: string
|
||||
title?: string
|
||||
|
|
@ -77,12 +67,7 @@ interface FetchResult {
|
|||
}
|
||||
|
||||
const isFetchResult = (obj: unknown): obj is FetchResult => {
|
||||
return (
|
||||
typeof obj === 'object' &&
|
||||
obj !== null &&
|
||||
'finalUrl' in obj &&
|
||||
'title' in obj
|
||||
)
|
||||
return typeof obj === 'object' && obj !== null && 'finalUrl' in obj
|
||||
}
|
||||
|
||||
const uploadToSignedUrl = async (
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export const createRedisClient = (url?: string, cert?: string) => {
|
|||
connectTimeout: 10000, // 10 seconds
|
||||
tls: cert
|
||||
? {
|
||||
cert,
|
||||
cert: cert.replace(/\\n/g, '\n'), // replace \n with new line
|
||||
rejectUnauthorized: false, // for self-signed certs
|
||||
}
|
||||
: undefined,
|
||||
|
|
|
|||
Loading…
Reference in a new issue