Spaces:
Sleeping
Sleeping
Update plugins/hammer.js
Browse files- plugins/hammer.js +10 -1
plugins/hammer.js
CHANGED
|
@@ -84,7 +84,16 @@ const handler = async (req, res) => {
|
|
| 84 |
if (!model) {
|
| 85 |
return res.status(400).json({
|
| 86 |
success: false,
|
| 87 |
-
error: 'Missing required parameter: model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
});
|
| 89 |
}
|
| 90 |
|
|
|
|
| 84 |
if (!model) {
|
| 85 |
return res.status(400).json({
|
| 86 |
success: false,
|
| 87 |
+
error: 'Missing required parameter: model',
|
| 88 |
+
availableModels: Object.keys(models)
|
| 89 |
+
});
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
if (!models[model.toLowerCase()]) {
|
| 93 |
+
return res.status(400).json({
|
| 94 |
+
success: false,
|
| 95 |
+
error: 'Invalid model',
|
| 96 |
+
availableModels: Object.keys(models)
|
| 97 |
});
|
| 98 |
}
|
| 99 |
|