Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CD-CODE Web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CD-CODE team
CD-CODE Web
Commits
2ca4a1ce
Commit
2ca4a1ce
authored
3 years ago
by
moon
Browse files
Options
Downloads
Patches
Plain Diff
Removed log() calls
parent
f49b0ed5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cms/src/api/update-item/controllers/update-item.js
+5
-18
5 additions, 18 deletions
cms/src/api/update-item/controllers/update-item.js
with
5 additions
and
18 deletions
cms/src/api/update-item/controllers/update-item.js
+
5
−
18
View file @
2ca4a1ce
...
...
@@ -104,11 +104,6 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
return
super
.
find
(
ctx
)
},
async
filterProteinRequest
(
ctx
)
{
// return ctx.send('Hello World!');
console
.
log
();
let
res
;
switch
(
ctx
.
state
.
user
.
role
.
name
)
{
case
'
Public
'
:
...
...
@@ -123,14 +118,14 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
ctx
.
query
[
"
filters
"
]
=
{
...
ctx
.
query
[
"
filters
"
],
EntityId
:
ctx
.
params
.
id
,
};
res
=
super
.
find
(
ctx
)
break
case
'
Contributor
'
:
// Remove operation should be intact
ctx
.
query
[
"
filters
"
]
=
{
...
ctx
.
query
[
"
filters
"
],
submittedBy
:
ctx
.
state
.
user
.
id
,
EntityId
:
ctx
.
params
.
id
}
...
...
@@ -152,7 +147,7 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
ctx
.
query
[
"
filters
"
]
=
{
...
ctx
.
query
[
"
filters
"
],
EntityId
:
ctx
.
params
.
id
,
};
// res= await strapi.entityService.findMany('api::update-item.update-item', {
...
...
@@ -175,21 +170,15 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
ctx
.
query
[
"
filters
"
]
=
{
...
ctx
.
query
[
"
filters
"
],
EntityId
:
ctx
.
params
.
id
,
};
res
=
super
.
find
(
ctx
)
break
;
}
console
.
log
(
res
);
return
res
},
async
filterCondensateRequest
(
ctx
)
{
// return ctx.send('Hello World!');
console
.
log
();
let
res
;
switch
(
ctx
.
state
.
user
.
role
.
name
)
{
case
'
Public
'
:
...
...
@@ -212,7 +201,7 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
break
case
'
Contributor
'
:
// Remove operation should be intact
ctx
.
query
[
"
filters
"
]
=
{
...
ctx
.
query
[
"
filters
"
],
submittedBy
:
ctx
.
state
.
user
.
id
,
EntityId
:
{
$contains
:
ctx
.
params
.
id
,
...
...
@@ -267,7 +256,6 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
res
=
super
.
find
(
ctx
)
break
;
}
console
.
log
(
res
);
return
res
},
async
findOne
(
ctx
)
{
...
...
@@ -297,5 +285,4 @@ module.exports = createCoreController('api::update-item.update-item', ({ strapi
return
this
.
transformResponse
(
sanitizedEntity
);
}
}));
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