Commit a00c0d1b authored by Franz Reischl's avatar Franz Reischl
Browse files

Separate version file

parent 8999effb
package university.at.jku.ce.model;
public class Version {
private final static String VERSION_NUMBER = "2.0";
public static String getVersion(){
return VERSION_NUMBER;
}
}
package university.at.jku.ce.resource;
import university.at.jku.ce.exception.ExceptionParam;
import university.at.jku.ce.model.Version;
import javax.annotation.security.PermitAll;
import javax.ws.rs.GET;
......@@ -18,7 +19,7 @@ public class VersionResource {
public Response getUsers(@Context HttpHeaders headers) {
ExceptionParam.setMediaType(headers.getMediaType());
HashMap<String, String> versionNumber = new HashMap<>();
versionNumber.put("version", "2.0");
versionNumber.put("version", Version.getVersion());
GenericEntity<HashMap<String, String>> entity = new GenericEntity<HashMap<String, String>>(versionNumber) {
};
return Response.ok(entity).build();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment