You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
831 B
33 lines
831 B
package com.redhat.pctsec.rest.v1alpha1; |
|
|
|
import com.redhat.pctsec.model.Scan; |
|
import com.redhat.pctsec.model.ScanRequest; |
|
import com.redhat.pctsec.model.ScanRequests; |
|
import com.redhat.pctsec.model.jpa.ScanRepository; |
|
import com.redhat.pctsec.model.jpa.ScanRequestsRepository; |
|
import jakarta.enterprise.context.ApplicationScoped; |
|
import jakarta.inject.Inject; |
|
import jakarta.ws.rs.GET; |
|
import jakarta.ws.rs.Path; |
|
import jakarta.ws.rs.Produces; |
|
|
|
import java.util.UUID; |
|
|
|
@ApplicationScoped |
|
@Path("/api/v1a/ScanRequests") |
|
public class ScanRequestsResource { |
|
|
|
@Inject |
|
ScanRequestsRepository sr; |
|
|
|
|
|
@GET |
|
@Path("{id}") |
|
@Produces({"application/json"}) |
|
public ScanRequests getScanRequests(String id) |
|
{ |
|
ScanRequests scanRequests = sr.findById(UUID.fromString(id)); |
|
return scanRequests; |
|
} |
|
|
|
}
|
|
|