Skip to content

Commit f7733af

Browse files
committed
Add suport for library version metadata.
1 parent 75f21b9 commit f7733af

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/main/java/com/parallax/server/blocklyprop/rest/RestCompile.java

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,18 @@
1818
import com.parallax.client.cloudcompiler.objects.CompilationResult;
1919
import com.parallax.client.cloudcompiler.objects.CompileAction;
2020
import com.parallax.client.cloudsession.CloudSessionBucketService;
21-
import com.parallax.client.cloudsession.exceptions.EmailNotConfirmedException;
22-
import com.parallax.client.cloudsession.exceptions.InsufficientBucketTokensException;
23-
import com.parallax.client.cloudsession.exceptions.ServerException;
24-
import com.parallax.client.cloudsession.exceptions.UnknownBucketTypeException;
25-
import com.parallax.client.cloudsession.exceptions.UnknownUserIdException;
26-
import com.parallax.client.cloudsession.exceptions.UserBlockedException;
21+
import com.parallax.client.cloudsession.exceptions.*;
2722
import com.parallax.server.blocklyprop.rest.typewrappers.CompileActionTypeWrapper;
2823
import com.parallax.server.blocklyprop.services.impl.SecurityServiceImpl;
29-
import javax.servlet.http.HttpServletRequest;
30-
import javax.ws.rs.FormParam;
31-
import javax.ws.rs.GET;
32-
import javax.ws.rs.POST;
33-
import javax.ws.rs.Path;
34-
import javax.ws.rs.PathParam;
35-
import javax.ws.rs.Produces;
36-
import javax.ws.rs.QueryParam;
37-
import javax.ws.rs.core.Response;
38-
import javax.ws.rs.core.Response.Status;
3924
import org.apache.commons.configuration.Configuration;
4025
import org.slf4j.Logger;
4126
import org.slf4j.LoggerFactory;
4227

28+
import javax.servlet.http.HttpServletRequest;
29+
import javax.ws.rs.*;
30+
import javax.ws.rs.core.Response;
31+
import javax.ws.rs.core.Response.Status;
32+
4333
/**
4434
*
4535
* @author Michel
@@ -72,12 +62,21 @@ public void setConfiguration(Configuration configuration) {
7262
@Name("compile")
7363
@Produces("text/plain")
7464
public Response get(@QueryParam("test") String testString) {
75-
7665
LOG.info("REST:/rest/compile/ Get request received");
77-
7866
return Response.ok("Hello " + testString).build();
7967
}
8068

69+
@GET
70+
@Detail("Get Simple Libraries version")
71+
@Name("version")
72+
@Produces("text/plain")
73+
public Response version() {
74+
LOG.info("REST:/rest/compile/ Get request received");
75+
return Response.ok("v0.0.0").build();
76+
}
77+
78+
79+
8180
@POST
8281
@Path("/spin/{action}")
8382
@Detail("Spin compile")

0 commit comments

Comments
 (0)