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
960855df
Commit
960855df
authored
10 months ago
by
shwtea
Browse files
Options
Downloads
Plain Diff
conflict solve
parents
424992c5
ad0c2678
Branches
Branches containing commit
No related tags found
1 merge request
!13
Shweta working
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
api/models/widget.js
+0
-1
0 additions, 1 deletion
api/models/widget.js
api/template/service.js
+3
-3
3 additions, 3 deletions
api/template/service.js
package.json
+1
-0
1 addition, 0 deletions
package.json
server.js
+7
-0
7 additions, 0 deletions
server.js
swagger.yaml
+0
-3
0 additions, 3 deletions
swagger.yaml
with
11 additions
and
7 deletions
api/models/widget.js
+
0
−
1
View file @
960855df
...
...
@@ -20,7 +20,6 @@ const BannerDataSchema = new Schema({
// Define schema for list items
const
ListItemSchema
=
new
Schema
({
bannerData
:
{
type
:
BannerDataSchema
,
required
:
true
},
display_order
:
{
type
:
Number
,
required
:
true
},
dimension
:
{
length
:
{
type
:
Number
,
required
:
true
},
breadth
:
{
type
:
Number
,
required
:
true
}
...
...
This diff is collapsed.
Click to expand it.
api/template/service.js
+
3
−
3
View file @
960855df
...
...
@@ -70,7 +70,7 @@ const createTemplate = async (name, desc, platform, widgets, hashId) => {
desc
,
platform
,
widgets
,
hashId
hashId
,
});
// Save the template to the database
...
...
@@ -108,5 +108,5 @@ const getParticularTemplate = async (page, platform) => {
module
.
exports
=
{
updateAndMapWidget
,
createTemplate
,
getParticularTemplate
getParticularTemplate
,
};
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
960855df
...
...
@@ -11,6 +11,7 @@
"license"
:
"
ISC
"
,
"dependencies"
:
{
"
body-parser
"
:
"
^1.20.2
"
,
"
cors
"
:
"
^2.8.5
"
,
"
dotenv
"
:
"
^16.4.5
"
,
"
express
"
:
"
^4.19.2
"
,
"
mongoose
"
:
"
^8.6.0
"
,
...
...
This diff is collapsed.
Click to expand it.
server.js
+
7
−
0
View file @
960855df
...
...
@@ -4,8 +4,14 @@ const bodyParser = require('body-parser');
const
swaggerUi
=
require
(
'
swagger-ui-express
'
);
const
YAML
=
require
(
'
yamljs
'
);
const
connectDB
=
require
(
'
./db
'
);
const
cors
=
require
(
'
cors
'
);
const
app
=
express
();
// enable cors
app
.
use
(
cors
());
app
.
options
(
'
*
'
,
cors
());
app
.
use
(
bodyParser
.
json
());
const
apiBaseRouter
=
require
(
'
./api/apiBaseRouter
'
);
...
...
@@ -14,6 +20,7 @@ connectDB();
// Serve Swagger API documentation
const
swaggerDocument
=
YAML
.
load
(
'
./swagger.yaml
'
);
app
.
use
(
'
/api-docs
'
,
swaggerUi
.
serve
,
swaggerUi
.
setup
(
swaggerDocument
));
// API base URL
...
...
This diff is collapsed.
Click to expand it.
swagger.yaml
+
0
−
3
View file @
960855df
...
...
@@ -46,9 +46,6 @@ paths:
type
:
array
items
:
type
:
object
properties
:
widgetId
:
type
:
string
position
:
type
:
integer
startTime
:
...
...
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