oops
This commit is contained in:
1 file changed
+2
-6
@@ -24,17 +24,13 @@ export const handler = async (context: Context) => {
|
|||||||
if (versionId)
|
if (versionId)
|
||||||
await db
|
await db
|
||||||
.update(launcherVersionManifest)
|
.update(launcherVersionManifest)
|
||||||
.set({
|
.set({ downloadCount: sql`${launcherVersionManifest.downloadCount} + 1` })
|
||||||
downloads: sql`${launcherVersionManifest.downloads} + 1`
|
|
||||||
})
|
|
||||||
.where(eq(launcherVersionManifest.id, versionId))
|
.where(eq(launcherVersionManifest.id, versionId))
|
||||||
|
|
||||||
if (modId)
|
if (modId)
|
||||||
await db
|
await db
|
||||||
.update(mods)
|
.update(mods)
|
||||||
.set({
|
.set({ downloadCount: sql`${mods.downloadCount} + 1` })
|
||||||
downloadCount: sql`${mods.downloadCount} + 1`
|
|
||||||
})
|
|
||||||
.where(eq(mods.id, Number(modId)))
|
.where(eq(mods.id, Number(modId)))
|
||||||
|
|
||||||
connection.end()
|
connection.end()
|
||||||
|
|||||||
Reference in new issue
Block a user