mirror of https://github.com/halo-dev/halo
Replace themeName with themeId
parent
feeecc30b2
commit
e46c1f8740
|
@ -97,7 +97,7 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
|
|||
*/
|
||||
private void cacheActiveTheme() {
|
||||
try {
|
||||
configuration.setSharedVariable("themeName", themeService.getActivatedThemeId());
|
||||
configuration.setSharedVariable("themeId", themeService.getActivatedThemeId());
|
||||
} catch (TemplateModelException e) {
|
||||
log.error("", e);
|
||||
}
|
||||
|
|
|
@ -331,7 +331,7 @@ public class ThemeServiceImpl implements ThemeService {
|
|||
|
||||
try {
|
||||
// TODO Refactor here in the future
|
||||
configuration.setSharedVariable("themeName", themeId);
|
||||
configuration.setSharedVariable("themeId", themeId);
|
||||
configuration.setSharedVariable("options", optionService.listOptions());
|
||||
} catch (TemplateModelException e) {
|
||||
throw new ServiceException("Failed to set shared variable", e).setErrorData(themeId);
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
function updateTheme(theme, e) {
|
||||
$(e).button('loading');
|
||||
$.get('/admin/themes/pull',{'themeName': theme},function (data) {
|
||||
$.get('/admin/themes/pull',{'themeId': theme},function (data) {
|
||||
if (data.code === 1) {
|
||||
halo.showMsgAndParentRedirect(data.msg, 'success', 1000, '/admin/themes');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue