mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-12 11:17:58 +00:00
moved post targets to an enum, in order to have more type safety, this might be changed in the future
added validation check when a feature is enabled, in order to notify which configuration is missing for this feature to function properly
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package dev.sheldan.abstracto.templating.service;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import dev.sheldan.abstracto.templating.Templatable;
|
||||
import dev.sheldan.abstracto.templating.model.*;
|
||||
import dev.sheldan.abstracto.templating.model.database.Template;
|
||||
import freemarker.template.Configuration;
|
||||
@@ -167,4 +168,9 @@ public class TemplateServiceBean implements TemplateService {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String renderTemplatable(Templatable templatable) {
|
||||
return renderTemplate(templatable.getTemplateName(), templatable.getTemplateModel());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user