feat: link official news to Ubisoft
This commit is contained in:
@@ -896,6 +896,7 @@ export async function loadPublishedArticle(
|
||||
COALESCE(profile.display_name,users.username,'Deleted Agent') AS author,profile.public_slug,
|
||||
images.updated_at AS cover_updated_at,
|
||||
source.provider AS external_provider,source.canonical_url AS external_canonical_url,
|
||||
source.thumbnail_url AS external_thumbnail_url,source.thumbnail_alt AS external_thumbnail_alt,
|
||||
source.source_published_at AS external_published_at,
|
||||
COALESCE(rating.average,0) AS rating,COALESCE(rating.votes,0) AS votes,
|
||||
curation.pinned_order,COALESCE(curation.featured,0) AS featured,COALESCE(curation.recommended,0) AS recommended
|
||||
@@ -995,8 +996,12 @@ export async function loadPublishedArticle(
|
||||
channel: row.channel ? String(row.channel) : null,
|
||||
coverUrl: row.cover_image_id
|
||||
? managedImageUrl(String(row.cover_image_id), row.cover_updated_at)
|
||||
: '',
|
||||
coverAlt: String(row.cover_alt),
|
||||
: row.external_thumbnail_url
|
||||
? `/images/news/${encodeURIComponent(String(row.article_id))}`
|
||||
: '',
|
||||
coverAlt: row.cover_image_id
|
||||
? String(row.cover_alt)
|
||||
: String(row.external_thumbnail_alt ?? ''),
|
||||
coverCaption: String(row.cover_caption),
|
||||
rating: Number(row.rating),
|
||||
votes: Number(row.votes),
|
||||
@@ -1110,6 +1115,7 @@ export async function listPublishedArticles(input: {
|
||||
await database.prepare(`${withClause} SELECT articles.id,articles.slug,articles.owner_id,articles.published_at,
|
||||
revision.id AS revision_id,revision.title,revision.deck,revision.channel,revision.cover_image_id,cover.updated_at AS cover_updated_at,
|
||||
source.provider AS external_provider,source.canonical_url AS external_canonical_url,
|
||||
source.thumbnail_url AS external_thumbnail_url,source.thumbnail_alt AS external_thumbnail_alt,
|
||||
COALESCE(profile.display_name,users.username,'Deleted Agent') AS author,profile.public_slug,
|
||||
COALESCE(ratings.rating,0) AS rating,COALESCE(ratings.votes,0) AS votes,
|
||||
curation.pinned_order,COALESCE(curation.featured,0) AS featured,COALESCE(curation.recommended,0) AS recommended,
|
||||
@@ -1142,7 +1148,12 @@ export async function listPublishedArticles(input: {
|
||||
: null,
|
||||
coverUrl: row.cover_image_id
|
||||
? managedImageUrl(String(row.cover_image_id), row.cover_updated_at)
|
||||
: '',
|
||||
: row.external_thumbnail_url
|
||||
? `/images/news/${encodeURIComponent(String(row.id))}`
|
||||
: '',
|
||||
coverAlt: row.cover_image_id
|
||||
? ''
|
||||
: String(row.external_thumbnail_alt ?? ''),
|
||||
rating: Number(row.rating),
|
||||
votes: Number(row.votes),
|
||||
pinnedOrder: row.pinned_order === null ? null : Number(row.pinned_order),
|
||||
|
||||
Reference in New Issue
Block a user