Package de.trustable.ca3s.core.web.rest
Class PreferenceResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.PreferenceResource
-
@RestController @RequestMapping("/api") public class PreferenceResource extends ObjectREST controller for readingCertificateusing the convenient CertificateView object. Just read-only access to this resource.
-
-
Constructor Summary
Constructors Constructor Description PreferenceResource(UserPreferenceService userPreferenceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<Preferences>getPreference(Long userId)GET /preference/:id: get the "id" certificate.org.springframework.http.ResponseEntity<Preferences>updatePreference(@Valid Preferences preferences, Long userId)PUT /preference: Update the preference.
-
-
-
Constructor Detail
-
PreferenceResource
public PreferenceResource(UserPreferenceService userPreferenceService)
-
-
Method Detail
-
getPreference
@GetMapping("/preference/{userId}") public org.springframework.http.ResponseEntity<Preferences> getPreference(@PathVariable Long userId)GET /preference/:id: get the "id" certificate.- Parameters:
userId- the id of the preference to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the certificate, or with status404 (Not Found).
-
updatePreference
@PutMapping("/preference/{userId}") public org.springframework.http.ResponseEntity<Preferences> updatePreference(@Valid @RequestBody @Valid Preferences preferences, @PathVariable Long userId)PUT /preference: Update the preference.- Parameters:
preferences- the preference- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated preference, or with status400 (Bad Request)if the preference is not valid, or with status500 (Internal Server Error)if the preference couldn't be updated.
-
-