updated sbt version and increased mime types flexibility

This commit is contained in:
2019-10-15 23:54:20 +01:00
parent 49734bf6d1
commit ed39b552de
2 changed files with 4 additions and 3 deletions

View File

@@ -1 +1 @@
sbt.version=1.0.1
sbt.version=1.3.1

View File

@@ -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