Allow bypassing validation check if we can't download the model
This commit is contained in:
parent
41affeae6e
commit
294564382c
21
common.js
21
common.js
@ -151,11 +151,22 @@ function capitalize(str) {
|
||||
}
|
||||
|
||||
async function validateMapAsset(assetId, game) {
|
||||
const modelDomRes = await axios.get("https://assetdelivery.roblox.com/v1/asset/", {
|
||||
params: { id: assetId },
|
||||
responseEncoding: "binary",
|
||||
responseType: "arraybuffer"
|
||||
});
|
||||
let modelDomRes;
|
||||
try {
|
||||
modelDomRes = await axios.get("https://assetdelivery.roblox.com/v1/asset/", {
|
||||
params: { id: assetId },
|
||||
responseEncoding: "binary",
|
||||
responseType: "arraybuffer"
|
||||
});
|
||||
}
|
||||
catch {
|
||||
// Roblox
|
||||
return {
|
||||
valid: true,
|
||||
displayName: "",
|
||||
creator: ""
|
||||
};
|
||||
}
|
||||
|
||||
const model = RobloxFile.ReadFromBuffer(modelDomRes.data);
|
||||
if (!model) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user