mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 18:11:13 -05:00
Fix ride model submission constraint
This commit is contained in:
@@ -682,18 +682,20 @@ Deno.serve(async (req) => {
|
||||
// Get manufacturer dependency for depends_on
|
||||
const mfgItemId = createdSubmissionItems.manufacturer.length > 0 ? randomItem(createdSubmissionItems.manufacturer) : undefined;
|
||||
|
||||
const category = randomItem(['roller_coaster', 'flat_ride', 'water_ride']);
|
||||
const modelData: any = {
|
||||
name: `Test Model ${i + 1}`,
|
||||
slug: `test-model-${i + 1}`,
|
||||
category: category,
|
||||
manufacturer_id: mfgData?.id || null
|
||||
};
|
||||
const category = randomItem(['roller_coaster', 'flat_ride', 'water_ride']);
|
||||
const rideType = randomItem(['spinning', 'launch', 'suspended', 'family', 'standard']);
|
||||
|
||||
const modelData: any = {
|
||||
name: `Test Model ${i + 1}`,
|
||||
slug: `test-model-${i + 1}`,
|
||||
category: category,
|
||||
ride_type: rideType,
|
||||
manufacturer_id: mfgData?.id || null
|
||||
};
|
||||
|
||||
if (level >= 1) {
|
||||
modelData.description = `Popular ${category.replace('_', ' ')} model.`;
|
||||
modelData.ride_type = randomItem(['spinning', 'launch', 'suspended', 'family']);
|
||||
}
|
||||
if (level >= 1) {
|
||||
modelData.description = `Popular ${category.replace('_', ' ')} model.`;
|
||||
}
|
||||
|
||||
if (level >= 2) {
|
||||
modelData.card_image_id = `test-model-card-${i + 1}`;
|
||||
|
||||
Reference in New Issue
Block a user