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