Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sshoc-marketplace-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
SSHOC
sshoc-marketplace-backend
Merge requests
!38
SSHOC-45 property types api
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
SSHOC-45 property types api
fix/SSHOC-45_property_type_post
into
develop
Overview
0
Commits
1
Pipelines
0
Changes
4
Merged
Szymon Wolarz
requested to merge
fix/SSHOC-45_property_type_post
into
develop
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
4
Expand
Change property types post endpoint Move property type code from url to request body
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
a151694f
1 commit,
4 years ago
4 files
+
14
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
src/main/java/eu/sshopencloud/marketplace/controllers/vocabularies/PropertyTypeController.java
+
4
−
5
Options
@@ -38,18 +38,17 @@ public class PropertyTypeController {
return
ResponseEntity
.
ok
(
propertyType
);
}
@PostMapping
(
value
=
"/{code}"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
PropertyTypeDto
>
createPropertyType
(
@PathVariable
(
"code"
)
String
propertyTypeCode
,
@RequestBody
PropertyTypeCore
propertyTypeData
)
@PostMapping
(
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
PropertyTypeDto
>
createPropertyType
(
@RequestBody
PropertyTypeCore
propertyTypeData
)
throws
PropertyTypeAlreadyExistsException
{
PropertyTypeDto
propertyType
=
propertyTypeService
.
createPropertyType
(
propertyTypeCode
,
propertyTypeData
);
PropertyTypeDto
propertyType
=
propertyTypeService
.
createPropertyType
(
propertyTypeData
);
return
ResponseEntity
.
ok
(
propertyType
);
}
@PutMapping
(
value
=
"/{code}"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
PropertyTypeDto
>
updatePropertyType
(
@PathVariable
(
"code"
)
String
propertyTypeCode
,
@RequestBody
PropertyTypeCore
propertyTypeData
)
{
@RequestBody
PropertyTypeCore
propertyTypeData
)
{
PropertyTypeDto
propertyType
=
propertyTypeService
.
updatePropertyType
(
propertyTypeCode
,
propertyTypeData
);
return
ResponseEntity
.
ok
(
propertyType
);
Loading