Company: Cognizant_27may
Difficulty: medium
Problem Description You are building the backend API for an Image Filter Application. The frontend relies on this API to retrieve the exact CSS configuration and DOM identifiers required to render an active image filter and update the UI button states. Your objective is to implement an endpoint that updates an image's filter configuration and returns a specific JSON payload satisfying the following client requirements: Return the strictly required identifier "previewImage" for the target img element. Return the active button box-shadow style strictly as 0 0 0 2px #6200ee . Return a constructed style_filter string combining the requested filter name and value. Endpoints PATCH /api/images/{imageId}/filter-config Request Format The request body must be a JSON object containing the target filter details: { "filter_name": "string (e.g., 'blur', 'brightness')", "filter_value": "string (e.g., '5px', '150%')" } Response Format Success (200 OK): Returns a JSON object with the exact configuratio