Skip to content
Snippets Groups Projects
Commit 7b8ce879 authored by Shweta Gupta's avatar Shweta Gupta
Browse files

Merge branch 'shweta-working' into 'development'

some changes

See merge request !8
parents 2b176f46 1e2ee0f3
No related branches found
No related tags found
1 merge request!8some changes
...@@ -60,7 +60,7 @@ const getParticularTemplate = async (page,platform) => { ...@@ -60,7 +60,7 @@ const getParticularTemplate = async (page,platform) => {
try { try {
const template = await Template.findOne({ name: page,platform}).populate('widgets.widgetId'); const template = await Template.findOne({ name: page,platform}).populate('widgets.widgetId');
if (!template) { if (!template) {
return res.status(404).json({ error: 'Template not found' }); return { status: 404, message: 'Template not found'};
} }
return template; return template;
} catch (error) { } catch (error) {
......
...@@ -21,12 +21,13 @@ paths: ...@@ -21,12 +21,13 @@ paths:
schema: schema:
type: string type: string
description: The page for which template details are requested. description: The page for which template details are requested.
- in: path - in: query # Add platform as a query parameter
name: platform name: platform
required: true required: true
schema: schema:
type: string type: string
description: The platform for which template details are requested. enum: ['web', 'mobile', 'both']
description: The platform for which template details are requested (web, mobile, or both).
responses: responses:
'200': '200':
description: Template retrieved successfully description: Template retrieved successfully
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment