]> git.lizzy.rs Git - cheatdb.git/commitdiff
Add downloads to package JSON
authorrubenwardy <rw@rubenwardy.com>
Sun, 2 Aug 2020 16:10:47 +0000 (17:10 +0100)
committerrubenwardy <rw@rubenwardy.com>
Sun, 2 Aug 2020 16:10:47 +0000 (17:10 +0100)
app/models.py

index 1674d15022ea322cd29875b25c01c0cb353ffe2c..f78457357ec64e340b03a323e658f789d2105758 100644 (file)
@@ -630,7 +630,8 @@ class Package(db.Model):
                        "url": base_url + self.getDownloadURL(),
                        "release": release and release.id,
 
-                       "score": round(self.score * 10) / 10
+                       "score": round(self.score * 10) / 10,
+                       "downloads": self.downloads
                }
 
        def getThumbnailURL(self, level=2):