use of com.orion.ops.consts.system.SystemConfigKey in project orion-ops by lijiahangmax.
the class SystemController method updateSystemOption.
/**
* 修改系统配置项
*/
@RequestMapping("/update-system-option")
@EventLog(EventType.UPDATE_SYSTEM_OPTION)
@RequireRole(RoleType.ADMINISTRATOR)
public HttpWrapper<?> updateSystemOption(@RequestBody SystemOptionRequest request) {
SystemConfigKey key = Valid.notNull(SystemConfigKey.of(request.getOption()));
String value = key.getValue(Valid.notBlank(request.getValue()));
systemService.updateSystemOption(key.getEnv(), value);
return HttpWrapper.ok();
}
Aggregations