Fixed REST interface

This commit is contained in:
Luca Frosini 2021-12-21 08:58:13 +01:00
parent dfe24ae9e1
commit 6cc6d855da
1 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,6 @@ public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Tra
}
@DELETE
@PURGE
@Override
public Response empty(@QueryParam(GCatConstants.OWN_ONLY_QUERY_PARAMETER) @DefaultValue("true") Boolean ownOnly) throws WebServiceException {
Thread thread = new Thread(new Runnable() {
@ -46,6 +45,12 @@ public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Tra
thread.start();
return Response.status(Status.ACCEPTED).build();
}
@PURGE
public Response emptyViaPurge(@QueryParam(GCatConstants.OWN_ONLY_QUERY_PARAMETER) @DefaultValue("true") Boolean ownOnly) throws WebServiceException {
return empty(ownOnly);
}
}