From fead482b0d4a6e3a99d82d5d130c521959e47982 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Wed, 17 Nov 2021 19:32:35 +0000 Subject: [PATCH] Fixed bugs introduced in preview functionality. --- src/main/java/org/qortal/api/resource/RenderResource.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/qortal/api/resource/RenderResource.java b/src/main/java/org/qortal/api/resource/RenderResource.java index b4e1f7f6..e1d691f5 100644 --- a/src/main/java/org/qortal/api/resource/RenderResource.java +++ b/src/main/java/org/qortal/api/resource/RenderResource.java @@ -95,7 +95,7 @@ public class RenderResource { if (arbitraryDataFile != null) { String digest58 = arbitraryDataFile.digest58(); if (digest58 != null) { - return "http://localhost:12393/render/WEBSITE/hash/" + digest58 + "?secret=" + Base58.encode(arbitraryDataFile.getSecret()); + return "http://localhost:12393/render/hash/" + digest58 + "?secret=" + Base58.encode(arbitraryDataFile.getSecret()); } } return "Unable to generate preview URL"; @@ -122,7 +122,7 @@ public class RenderResource { @SecurityRequirement(name = "apiKey") public HttpServletResponse getIndexByHash(@PathParam("hash") String hash58, @QueryParam("secret") String secret58) { Security.checkApiCallAllowed(request); - return this.get(hash58, ResourceIdType.FILE_HASH, null, "/", secret58, "/render/hash", true, false); + return this.get(hash58, ResourceIdType.FILE_HASH, Service.WEBSITE, "/", secret58, "/render/hash", true, false); } @GET @@ -131,7 +131,7 @@ public class RenderResource { public HttpServletResponse getPathByHash(@PathParam("hash") String hash58, @PathParam("path") String inPath, @QueryParam("secret") String secret58) { Security.checkApiCallAllowed(request); - return this.get(hash58, ResourceIdType.FILE_HASH, null, inPath, secret58, "/render/hash", true, false); + return this.get(hash58, ResourceIdType.FILE_HASH, Service.WEBSITE, inPath, secret58, "/render/hash", true, false); } @GET