Commit 31e75c68 authored by 0Tyler's avatar 0Tyler

readPrivacyPolicyReport Path change

parent 20f39116
......@@ -46,14 +46,15 @@ public class GatewayController {
.orElseGet(() -> ResponseEntity.noContent().build());
}
//
@GetMapping("/device/{udn}")
//透過裝置UDN取得裝置資訊與隱私政策
@GetMapping("/privacy/{udn}")
public ResponseEntity<PrivacyPolicyReport> readPrivacyPolicyReportByDevice(@PathVariable(value = "udn") String udn) {
return privacyService.getRelatedPrivacyPolicies(udn)
.map(ResponseEntity::ok)
.orElseGet(() -> ResponseEntity.noContent().build());
}
//設定隱私選擇
@PostMapping("/choice")
public ResponseEntity<PrivacyChoice> setPrivacyChoice(@RequestBody PrivacyChoice privacyChoice) {
return privacyService.setPrivacyPolicyChoice(privacyChoice)
......
......@@ -83,7 +83,7 @@ public class GatewayHttpApiTest {
//拿取隱私政策
result = mvc.perform(MockMvcRequestBuilders
.get("/device/" + "a1252c49-4188-4e6d-a32e-66604c664fb8")
.get("/privacy/" + "a1252c49-4188-4e6d-a32e-66604c664fb8")
.accept(MediaType.APPLICATION_JSON_UTF8))
.andDo(print())
.andExpect(status().isOk())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment