Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iotgateway
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
0Tyler
iotgateway
Commits
31e75c68
Commit
31e75c68
authored
May 13, 2019
by
0Tyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readPrivacyPolicyReport Path change
parent
20f39116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/GatewayController.java
...ler/iotgateway/gateway/controllers/GatewayController.java
+3
-2
gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java
...du/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java
+1
-1
No files found.
gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/GatewayController.java
View file @
31e75c68
...
@@ -46,14 +46,15 @@ public class GatewayController {
...
@@ -46,14 +46,15 @@ public class GatewayController {
.
orElseGet
(()
->
ResponseEntity
.
noContent
().
build
());
.
orElseGet
(()
->
ResponseEntity
.
noContent
().
build
());
}
}
//
//
透過裝置UDN取得裝置資訊與隱私政策
@GetMapping
(
"/
device
/{udn}"
)
@GetMapping
(
"/
privacy
/{udn}"
)
public
ResponseEntity
<
PrivacyPolicyReport
>
readPrivacyPolicyReportByDevice
(
@PathVariable
(
value
=
"udn"
)
String
udn
)
{
public
ResponseEntity
<
PrivacyPolicyReport
>
readPrivacyPolicyReportByDevice
(
@PathVariable
(
value
=
"udn"
)
String
udn
)
{
return
privacyService
.
getRelatedPrivacyPolicies
(
udn
)
return
privacyService
.
getRelatedPrivacyPolicies
(
udn
)
.
map
(
ResponseEntity:
:
ok
)
.
map
(
ResponseEntity:
:
ok
)
.
orElseGet
(()
->
ResponseEntity
.
noContent
().
build
());
.
orElseGet
(()
->
ResponseEntity
.
noContent
().
build
());
}
}
//設定隱私選擇
@PostMapping
(
"/choice"
)
@PostMapping
(
"/choice"
)
public
ResponseEntity
<
PrivacyChoice
>
setPrivacyChoice
(
@RequestBody
PrivacyChoice
privacyChoice
)
{
public
ResponseEntity
<
PrivacyChoice
>
setPrivacyChoice
(
@RequestBody
PrivacyChoice
privacyChoice
)
{
return
privacyService
.
setPrivacyPolicyChoice
(
privacyChoice
)
return
privacyService
.
setPrivacyPolicyChoice
(
privacyChoice
)
...
...
gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java
View file @
31e75c68
...
@@ -83,7 +83,7 @@ public class GatewayHttpApiTest {
...
@@ -83,7 +83,7 @@ public class GatewayHttpApiTest {
//拿取隱私政策
//拿取隱私政策
result
=
mvc
.
perform
(
MockMvcRequestBuilders
result
=
mvc
.
perform
(
MockMvcRequestBuilders
.
get
(
"/
device
/"
+
"a1252c49-4188-4e6d-a32e-66604c664fb8"
)
.
get
(
"/
privacy
/"
+
"a1252c49-4188-4e6d-a32e-66604c664fb8"
)
.
accept
(
MediaType
.
APPLICATION_JSON_UTF8
))
.
accept
(
MediaType
.
APPLICATION_JSON_UTF8
))
.
andDo
(
print
())
.
andDo
(
print
())
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment