Revert originalArticleUrl change
This commit is contained in:
@ -45,7 +45,6 @@ import {
|
||||
import { ContentParseError } from '../../utils/errors'
|
||||
import {
|
||||
authorized,
|
||||
cleanDomainInUrl,
|
||||
generateSlug,
|
||||
isParsingTimeout,
|
||||
pageError,
|
||||
@ -878,7 +877,7 @@ export const searchResolver = authorized<
|
||||
isArchived: !!r.archivedAt,
|
||||
contentReader:
|
||||
r.pageType === PageType.File ? ContentReader.Pdf : ContentReader.Web,
|
||||
originalArticleUrl: cleanDomainInUrl(r.url),
|
||||
originalArticleUrl: r.url,
|
||||
publishedAt: validatedDate(r.publishedAt),
|
||||
ownedByViewer: r.userId === claims.uid,
|
||||
pageType: r.pageType || PageType.Highlights,
|
||||
|
||||
@ -230,7 +230,3 @@ export const validatedDate = (
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
export const cleanDomainInUrl = (url: string): string => {
|
||||
return url.replace(/^((https?:\/\/)?)(www.)/, (match, p1: string) => p1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user