Skip to content

Commit 9efa60a

Browse files
committed
Remove unused resource
1 parent 1ae4310 commit 9efa60a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java

-18
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import java.util.List;
4141
import java.util.Set;
4242
import java.util.UUID;
43-
import java.util.function.Function;
4443

4544
@Path("/auditlog")
4645
public class AuditLogResource {
@@ -93,23 +92,6 @@ public List<AuditEventDto> getAllEvents(@QueryParam("startDate") Instant startDa
9392
return auditEventRepo.findAllInPeriod(startDate, endDate, type, paginationId, order.equals("asc"), pageSize).map(AuditEventDto::fromEntity).toList();
9493
}
9594

96-
@GET
97-
@Path("/last-vault-key-retrieve")
98-
@RolesAllowed("admin")
99-
@Produces(MediaType.APPLICATION_JSON)
100-
@Operation(summary = "list last vault key retrieve auditlog entry by device id", description = "list last vault key retrieve auditlog entry by device id")
101-
@Parameter(name = "deviceIds", description = "list of deviceIds", in = ParameterIn.QUERY)
102-
@APIResponse(responseCode = "200", description = "Body contains list of events")
103-
@APIResponse(responseCode = "402", description = "Community license used or license expired")
104-
@APIResponse(responseCode = "403", description = "requesting user does not have admin role")
105-
public List<VaultKeyRetrievedEventDto> lastVaultKeyRetrieve(@QueryParam("deviceIds") List<String> deviceIds) {
106-
if (!license.isSet() || license.isExpired()) {
107-
throw new PaymentRequiredException("Community license used or license expired");
108-
}
109-
Function<VaultKeyRetrievedEvent, VaultKeyRetrievedEventDto> mapper = e -> new VaultKeyRetrievedEventDto(e.getId(), e.getTimestamp(), e.getType(), e.getRetrievedBy(), e.getVaultId(), e.getResult(), e.getIpAddress(), e.getDeviceId());
110-
return auditEventRepo.findLastVaultKeyRetrieve(deviceIds).map(mapper).toList();
111-
}
112-
11395
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
11496
@JsonSubTypes({ //
11597
@JsonSubTypes.Type(value = DeviceRegisteredEventDto.class, name = DeviceRegisteredEvent.TYPE), //

0 commit comments

Comments
 (0)