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