fix: member editing unimplemented
This commit is contained in:
@@ -44,14 +44,6 @@ public class CredentialController {
|
||||
);
|
||||
}
|
||||
|
||||
@GetMapping("/test/{userId}")
|
||||
public ResponseEntity<String> test(@PathVariable("userId") UUID userId) {
|
||||
CorePrincipal principal = (CorePrincipal) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
return ResponseEntity.ok(
|
||||
userId.equals(principal.getUserId()) ? "OK" : "NO"
|
||||
);
|
||||
}
|
||||
|
||||
@GetMapping("/user/{userId}")
|
||||
public ResponseEntity<List<CredentialDto>> getByUserId(@PathVariable("userId") UUID userId) {
|
||||
CorePrincipal principal = (CorePrincipal) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
@@ -85,11 +77,24 @@ public class CredentialController {
|
||||
}
|
||||
return ResponseEntity.ok(
|
||||
CredentialMapper.toDto(
|
||||
credentialService.update(credentialId, CredentialMapper.toEntity(dto))
|
||||
credentialService.update(credentialId, CredentialMapper.toEntity(dto))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@PutMapping("/{credential_id}/full")
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
public ResponseEntity<CredentialDto> updateFull(
|
||||
@PathVariable("credential_id") UUID credentialId,
|
||||
@RequestBody CredentialDto dto
|
||||
) {
|
||||
return ResponseEntity.ok(
|
||||
CredentialMapper.toDto(
|
||||
credentialService.update(credentialId, CredentialMapper.toEntity(dto))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@GetMapping("/{service_id}/{user_id}/status")
|
||||
public ResponseEntity<Byte> getStatus(@PathVariable("user_id") UUID userId, @PathVariable("service_id") Byte serviceId) {
|
||||
return ResponseEntity.ok(credentialService.getStatus(userId, serviceId));
|
||||
|
||||
Reference in New Issue
Block a user