Replace themeName with themeId

pull/146/head
johnniang 2019-04-20 16:31:47 +08:00
parent feeecc30b2
commit e46c1f8740
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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 {