mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
Web: Save config to file when changed
This commit is contained in:
parent
35fe543b70
commit
f26067cd5d
|
@ -43,6 +43,7 @@ namespace BililiveRecorder.Web.Api
|
|||
public ActionResult<GlobalConfigDto> SetGlobalConfig([FromBody] SetGlobalConfig config)
|
||||
{
|
||||
config.ApplyTo(this.recorder.Config.Global);
|
||||
this.recorder.SaveConfig();
|
||||
return this.mapper.Map<GlobalConfigDto>(this.recorder.Config.Global);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,6 +260,8 @@ namespace BililiveRecorder.Web.Api
|
|||
|
||||
config.ApplyTo(room.RoomConfig);
|
||||
|
||||
this.recorder.SaveConfig();
|
||||
|
||||
return this.mapper.Map<RoomConfigDto>(room.RoomConfig);
|
||||
}
|
||||
|
||||
|
@ -280,6 +282,8 @@ namespace BililiveRecorder.Web.Api
|
|||
|
||||
config.ApplyTo(room.RoomConfig);
|
||||
|
||||
this.recorder.SaveConfig();
|
||||
|
||||
return this.mapper.Map<RoomConfigDto>(room.RoomConfig);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user