mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Add cover_image to screenshot response in API
This commit is contained in:
parent
5bb9012655
commit
e7d2f09eb4
@ -226,6 +226,7 @@ curl -X DELETE https://content.minetest.net/api/packages/username/name/releases/
|
||||
* `url`: absolute URL to screenshot.
|
||||
* `created_at`: ISO time.
|
||||
* `order`: Number used in ordering.
|
||||
* `is_cover_image`: true for cover image.
|
||||
* GET `/api/packages/<username>/<name>/screenshots/<id>/` (Read)
|
||||
* Returns screenshot dictionary like above.
|
||||
* POST `/api/packages/<username>/<name>/screenshots/new/` (Create)
|
||||
|
@ -1093,6 +1093,7 @@ class PackageScreenshot(db.Model):
|
||||
"url": base_url + self.url,
|
||||
"approved": self.approved,
|
||||
"created_at": self.created_at.isoformat(),
|
||||
"is_cover_image": self.package.cover_image == self,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user