mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-24 05:39:44 +00:00
[AB-82] adding feature mode to make it configurable whether or not the youtube video will show details or not
adding convenience method to config service
This commit is contained in:
@@ -6,6 +6,7 @@ import dev.sheldan.abstracto.core.models.database.AConfig;
|
||||
import dev.sheldan.abstracto.core.models.property.SystemConfigProperty;
|
||||
import dev.sheldan.abstracto.core.service.management.ConfigManagementService;
|
||||
import dev.sheldan.abstracto.core.service.management.DefaultConfigManagementService;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -73,6 +74,11 @@ public class ConfigServiceBean implements ConfigService {
|
||||
return config.getLongValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getBooleanValueOrConfigDefault(String name, Long serverId) {
|
||||
return BooleanUtils.toBoolean(getStringValueOrConfigDefault(name, serverId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDoubleValue(String name, Long serverId, Double value) {
|
||||
if(configManagementService.configExists(serverId, name)) {
|
||||
|
||||
Reference in New Issue
Block a user