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