v1.0.21
This commit is contained in:
1 parent
790ce092ee
commit
55f3101a19
51 files changed
+763
-599
No files matched your search
@@ -80,8 +80,14 @@ export const POST: RequestHandler = async (event) => {
|
||||
return json({ error: 'An environment with this name already exists' }, { status: 409 });
|
||||
}
|
||||
|
||||
// Host is required for direct and hawser-standard connections
|
||||
// Validate connection type
|
||||
const validConnectionTypes = ['socket', 'direct', 'hawser-standard', 'hawser-edge'];
|
||||
const connectionType = data.connectionType || 'socket';
|
||||
if (!validConnectionTypes.includes(connectionType)) {
|
||||
return json({ error: `Invalid connection type: ${connectionType}` }, { status: 400 });
|
||||
}
|
||||
|
||||
// Host is required for direct and hawser-standard connections
|
||||
if ((connectionType === 'direct' || connectionType === 'hawser-standard') && !data.host) {
|
||||
return json({ error: 'Host is required for this connection type' }, { status: 400 });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user