diff --git a/repositories/userRepository.js b/repositories/userRepository.js index a2b258b..b6b3113 100644 --- a/repositories/userRepository.js +++ b/repositories/userRepository.js @@ -6,8 +6,8 @@ const { DefaultError } = require("../errors/errors") async function getSkins(uuid) { try { const sql = ` - SELECT t.hash, t.url, ps.variant, ps.isSelected - FROM playersSkins ps + SELECT t.uuid as textureUuid, t.hash, t.url, ps.variant, ps.isSelected + FROM playerSkins ps JOIN textures t ON ps.assetHash = t.hash WHERE ps.playerUuid = ? ` @@ -21,8 +21,8 @@ async function getSkins(uuid) { async function getCapes(uuid) { try { const sql = ` - SELECT t.hash, t.url, t.alias, pc.isSelected - FROM playersCapes pc + SELECT t.uuid as textureUuid, t.hash, t.url, t.alias, pc.isSelected + FROM playerCapes pc JOIN textures t ON pc.assetHash = t.hash WHERE pc.playerUuid = ? `