updated sbt version and increased mime types flexibility
This commit is contained in:
@@ -1 +1 @@
|
||||
sbt.version=1.0.1
|
||||
sbt.version=1.3.1
|
||||
|
@@ -252,7 +252,8 @@ class PacmanWebService {
|
||||
|
||||
@GET
|
||||
@Path("download/{filename}")
|
||||
@Produces(Array(MediaType.APPLICATION_OCTET_STREAM)) def downloadPackage(@PathParam("filename") fileName: String): Response = {
|
||||
@Produces(Array(MediaType.APPLICATION_OCTET_STREAM))
|
||||
def downloadPackage(@PathParam("filename") fileName: String): Response = {
|
||||
val em = emf.createEntityManager()
|
||||
val fnquery = em.createQuery(PacmanWebService.fileNameQuery, classOf[PkgData])
|
||||
fnquery.setParameter("fileName", fileName)
|
||||
@@ -300,7 +301,7 @@ class PacmanWebService {
|
||||
@POST
|
||||
@Path("/upload")
|
||||
@TransactionAttribute(TransactionAttributeType.REQUIRED)
|
||||
@Consumes(Array(MediaType.APPLICATION_OCTET_STREAM))
|
||||
@Consumes(Array("application/x-xz", "application/gzip", "application/x-tar", MediaType.APPLICATION_OCTET_STREAM))
|
||||
def createPackage(input: InputStream, @MatrixParam("filename") filename: String): Response = {
|
||||
val em = emf.createEntityManager()
|
||||
if (filename == null) throw new BadRequestException
|
||||
|
Reference in New Issue
Block a user