update context image should be text
All checks were successful
Deploy to Production / deploy (push) Successful in 20s

This commit is contained in:
silverpro89
2026-02-10 17:43:17 +07:00
parent 5957636b07
commit 09e72e37e7
3 changed files with 10 additions and 14 deletions

View File

@@ -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)'
});
}