update context image should be text
All checks were successful
Deploy to Production / deploy (push) Successful in 20s
All checks were successful
Deploy to Production / deploy (push) Successful in 20s
This commit is contained in:
@@ -228,10 +228,10 @@ class ContextController {
|
||||
const { id } = req.params;
|
||||
const { image } = req.body;
|
||||
|
||||
if (!image || !Array.isArray(image) || image.length === 0) {
|
||||
if (!image || typeof image !== 'string' || image.trim().length === 0) {
|
||||
return res.status(400).json({
|
||||
success: false,
|
||||
message: 'Image must be a non-empty array of URLs'
|
||||
message: 'Image must be a non-empty string (URL)'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user