🚧 Fix bug with file

This commit is contained in:
Andreas Dinauer 2026-04-19 16:23:42 +02:00
parent 250885e831
commit de1f8ff108

View File

@ -46,14 +46,14 @@ public class Service
public Response upload(String path, byte[] body) public Response upload(String path, byte[] body)
{ {
MavenContext mavenContext = MavenContextProvider.parse(path); MavenContext mavenContext = MavenContextProvider.parse(path);
if (mavenContext.version().getSnapshot())
{
throw new WebApplicationException(501);
}
switch (mavenContext.file().getType()) switch (mavenContext.file().getType())
{ {
case JAR -> case JAR ->
{ {
if (mavenContext.version().getSnapshot())
{
throw new WebApplicationException(501);
}
if (FileHash.NONE.equals(mavenContext.file().getHash())) if (FileHash.NONE.equals(mavenContext.file().getHash()))
{ {
return jarService.store(mavenContext, body); return jarService.store(mavenContext, body);