Skip to content

Commit

Permalink
fix: inconsistencies in asset
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Jul 14, 2023
1 parent f0fa95e commit 7eb67e0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/routes/asset/getAssetFromId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ export const getAssetFromId = async (
id: row.id,
name: row.name,
game: row.game,
assetCategory: row.asset_category,
asset_category: row.asset_category,
url: row.url,
tags: row.tags,
status: row.status,
uploadedBy: row.uploaded_by,
uploadedDate: row.uploaded_date,
fileSize: row.file_size,
uploaded_by: row.uploaded_by,
uploaded_date: row.uploaded_date,
file_size: row.file_size,
};

const similarAssets = await (
await db
.execute(
"SELECT * FROM assets WHERE game = ? AND asset_category = ? AND id != ? ORDER BY RAND() LIMIT 3",
"SELECT * FROM assets WHERE game = ? AND asset_category = ? AND id != ? ORDER BY RAND() LIMIT 4",
[row.game, row.asset_category, row.id]
)
.then((row) => row.rows as Asset[])
Expand All @@ -66,13 +66,13 @@ export const getAssetFromId = async (
id: asset.id,
name: asset.name,
game: asset.game,
assetCategory: asset.asset_category,
asset_category: asset.asset_category,
url: asset.url,
tags: asset.tags,
status: asset.status,
uploadedBy: asset.uploaded_by,
uploadedDate: asset.uploaded_date,
fileSize: asset.file_size,
uploaded_by: asset.uploaded_by,
uploaded_date: asset.uploaded_date,
file_size: asset.file_size,
};
});

Expand Down

0 comments on commit 7eb67e0

Please sign in to comment.