Compare commits

...

2 Commits

Author SHA1 Message Date
8d5fbdf18e Merge pull request 'Try old asset API' (#17) from use-other-asset-api into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #17
2024-04-26 02:12:09 +00:00
84034001c9 Try old asset API 2024-04-25 21:08:40 -05:00

View File

@ -141,7 +141,13 @@ function capitalize(str) {
} }
async function validateMapAsset(assetId, game) { async function validateMapAsset(assetId, game) {
const model = await RobloxModel.ReadFromAssetId(assetId); const modelDomRes = await axios.get("https://assetdelivery.roblox.com/v1/asset/", {
params: { id: assetId },
responseEncoding: "binary",
responseType: "arraybuffer"
});
const model = RobloxModel.ReadFromBuffer(modelDomRes.data);
if (!model) { if (!model) {
// For whatever reason we couldn't parse the model, so we'll just skip doing validation // For whatever reason we couldn't parse the model, so we'll just skip doing validation
return { return {