|
18 | 18 | import com.parallax.client.cloudcompiler.objects.CompilationResult; |
19 | 19 | import com.parallax.client.cloudcompiler.objects.CompileAction; |
20 | 20 | 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.*; |
27 | 22 | import com.parallax.server.blocklyprop.rest.typewrappers.CompileActionTypeWrapper; |
28 | 23 | 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; |
39 | 24 | import org.apache.commons.configuration.Configuration; |
40 | 25 | import org.slf4j.Logger; |
41 | 26 | import org.slf4j.LoggerFactory; |
42 | 27 |
|
| 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 | + |
43 | 33 | /** |
44 | 34 | * |
45 | 35 | * @author Michel |
@@ -72,12 +62,21 @@ public void setConfiguration(Configuration configuration) { |
72 | 62 | @Name("compile") |
73 | 63 | @Produces("text/plain") |
74 | 64 | public Response get(@QueryParam("test") String testString) { |
75 | | - |
76 | 65 | LOG.info("REST:/rest/compile/ Get request received"); |
77 | | - |
78 | 66 | return Response.ok("Hello " + testString).build(); |
79 | 67 | } |
80 | 68 |
|
| 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 | + |
81 | 80 | @POST |
82 | 81 | @Path("/spin/{action}") |
83 | 82 | @Detail("Spin compile") |
|
0 commit comments