fix: 去除开站引导系统重置判断

This commit is contained in:
TsMask
2025-04-10 11:36:21 +08:00
parent 4ef02050d0
commit 58f92d9703

View File

@@ -112,15 +112,15 @@ func (s *BootloaderController) Done(c *gin.Context) {
// DELETE /
func (s *BootloaderController) Reset(c *gin.Context) {
// 是否完成引导
launchInfo := machine.LaunchInfo
if launchInfo == nil {
c.JSON(200, resp.Err(nil))
return
}
if v, ok := launchInfo[constants.LAUNCH_BOOTLOADER]; ok && v.(bool) {
c.JSON(200, resp.ErrMsg("bootloader not done"))
return
}
// launchInfo := machine.LaunchInfo
// if launchInfo == nil {
// c.JSON(200, resp.Err(nil))
// return
// }
// if v, ok := launchInfo[constants.LAUNCH_BOOTLOADER]; ok && v.(bool) {
// c.JSON(200, resp.ErrMsg("bootloader not done"))
// return
// }
if err := machine.Reset(); err != nil {
c.JSON(200, resp.ErrMsg(err.Error()))