X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FDebugLoaders.java;h=c42b056f59085d134d1c30c9161b7268b704d413;hp=14c58b647e98c644f15e3b4f3ce45d02975d450b;hb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052;hpb=70d761ab3aeba06a3acfd0a8bccdde49a5d8b9b4 diff --git a/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java b/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java index 14c58b6..c42b056 100644 --- a/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java +++ b/src/main/java/net/pterodactylus/sone/main/DebugLoaders.java @@ -3,15 +3,15 @@ package net.pterodactylus.sone.main; import java.io.File; import net.pterodactylus.sone.template.FilesystemTemplate; -import net.pterodactylus.sone.web.ReloadingPage; +import net.pterodactylus.sone.web.pages.ReloadingPage; +import net.pterodactylus.util.template.FilesystemTemplateProvider; import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateProvider; import net.pterodactylus.util.web.Page; import net.pterodactylus.util.web.Request; /** * {@link Loaders} implementation that loads all resources from the filesystem. - * - * @author David ‘Bombe’ Roden */ public class DebugLoaders implements Loaders { @@ -28,7 +28,12 @@ public class DebugLoaders implements Loaders { @Override public Page loadStaticPage(String basePath, String prefix, String mimeType) { - return new ReloadingPage(basePath, new File(filesystemPath, prefix).getAbsolutePath(), mimeType); + return new ReloadingPage<>(basePath, new File(filesystemPath, prefix).getAbsolutePath(), mimeType); + } + + @Override + public TemplateProvider getTemplateProvider() { + return new FilesystemTemplateProvider(new File(filesystemPath, "/templates/").getAbsolutePath()); } }