Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
apis
Project
Commits
b6586fac
Commit
b6586fac
authored
3 years ago
by
Petar Hristov
Browse files
Options
Downloads
Patches
Plain Diff
Update: Update method (coscine/issues#1971)
parent
a748b2b8
Branches
Branches containing commit
No related tags found
2 merge requests
!190
Update: ProjectUpdate Method
,
!186
Update: Project API methods (coscine/issues#1971)
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Project/Controllers/ProjectController.cs
+4
-3
4 additions, 3 deletions
src/Project/Controllers/ProjectController.cs
with
4 additions
and
3 deletions
src/Project/Controllers/ProjectController.cs
+
4
−
3
View file @
b6586fac
...
...
@@ -456,13 +456,14 @@ namespace Coscine.Api.Project.Controllers
/// <summary>
/// Updates the selected project
/// </summary>
/// <param name="id">Id of the project</param>
/// <param name="projectObject">A Project Object</param>
/// <returns>OK or status code 401</returns>
[
HttpPost
(
"[controller]/{id}"
)]
public
IActionResult
Update
([
FromBody
]
ProjectObject
projectObject
)
public
IActionResult
Update
(
Guid
id
,
[
FromBody
]
ProjectObject
projectObject
)
{
var
user
=
_authenticator
.
GetUser
();
var
project
=
_projectModel
.
GetById
(
projectObject
.
I
d
);
var
project
=
_projectModel
.
GetById
(
i
d
);
if
(
_projectModel
.
HasAccess
(
user
,
project
,
UserRoles
.
Owner
))
{
LogAnalyticsEditProject
(
project
,
_projectModel
.
GetMetadataCompleteness
(
projectObject
),
projectObject
.
Disciplines
,
projectObject
.
Organizations
,
user
);
...
...
@@ -477,7 +478,7 @@ namespace Coscine.Api.Project.Controllers
/// <summary>
/// Deletes the selected project
/// </summary>
/// <param name="id">Id of the
resource
</param>
/// <param name="id">Id of the
project
</param>
/// <returns>JSON object or status code 401</returns>
[
HttpDelete
(
"[controller]/{id}"
)]
public
IActionResult
Delete
(
string
id
)
...
...
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