Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
widgetTemplate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shweta Gupta
widgetTemplate
Commits
7b8ce879
Commit
7b8ce879
authored
10 months ago
by
Shweta Gupta
Browse files
Options
Downloads
Plain Diff
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
!8
some changes
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/template/service.js
+1
-1
1 addition, 1 deletion
api/template/service.js
swagger.yaml
+3
-2
3 additions, 2 deletions
swagger.yaml
with
4 additions
and
3 deletions
api/template/service.js
+
1
−
1
View file @
7b8ce879
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
swagger.yaml
+
3
−
2
View file @
7b8ce879
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment