fix: 去除开站引导系统重置判断
This commit is contained in:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user