new thumbor (assets.discours.io -> images.discours.io), new visibility for non published articles (authors -> community)

This commit is contained in:
Igor Lobanov
2023-10-25 22:38:22 +02:00
parent da8ee9b9c3
commit c8a951594c
4 changed files with 7 additions and 7 deletions

View File

@@ -140,10 +140,10 @@ async def migrate(entry, storage):
"authors": [author, ],
"slug": get_shout_slug(entry),
"cover": (
"https://assets.discours.io/unsafe/1600x/" +
"https://images.discours.io/unsafe/" +
entry["thumborId"] if entry.get("thumborId") else entry.get("image", {}).get("url")
),
"visibility": "public" if entry.get("published") else "authors",
"visibility": "public" if entry.get("published") else "community",
"publishedAt": date_parse(entry.get("publishedAt")) if entry.get("published") else None,
"deletedAt": date_parse(entry.get("deletedAt")) if entry.get("deletedAt") else None,
"createdAt": date_parse(entry.get("createdAt", OLD_DATE)),