Browse Source

Removed service from POST /render/preview/{service} API as it isn't needed right now

qdn
CalDescent 3 years ago
parent
commit
29bd8203b5
  1. 6
      src/main/java/org/qortal/api/resource/RenderResource.java

6
src/main/java/org/qortal/api/resource/RenderResource.java

@ -43,7 +43,7 @@ public class RenderResource {
@Context ServletContext context;
@POST
@Path("/preview/{service}")
@Path("/preview")
@Operation(
summary = "Generate preview URL based on a user-supplied path and service",
requestBody = @RequestBody(
@ -68,7 +68,7 @@ public class RenderResource {
}
)
@SecurityRequirement(name = "apiKey")
public String preview(@PathParam("service") Service service, String directoryPath) {
public String preview(String directoryPath) {
Security.checkApiCallAllowed(request);
// It's too dangerous to allow user-supplied filenames in weaker security contexts
@ -80,7 +80,7 @@ public class RenderResource {
Method method = Method.PUT;
Compression compression = Compression.ZIP;
ArbitraryDataWriter arbitraryDataWriter = new ArbitraryDataWriter(Paths.get(directoryPath), name, service, null, method, compression);
ArbitraryDataWriter arbitraryDataWriter = new ArbitraryDataWriter(Paths.get(directoryPath), name, Service.WEBSITE, null, method, compression);
try {
arbitraryDataWriter.save();
} catch (IOException | DataException | InterruptedException | MissingDataException e) {

Loading…
Cancel
Save