feat: simplify online update center
Signed Release / release (push) Successful in 9m41s

This commit is contained in:
Qiufeng
2026-08-04 21:25:43 +08:00
parent d3892320dd
commit abba079dde
8 changed files with 382 additions and 302 deletions
@@ -5,6 +5,7 @@ import com.kaidi.oa.service.SystemUpdateConfigService;
import com.kaidi.oa.service.SystemUpdateConfigService.UpdateConfig;
import com.kaidi.oa.service.SystemUpdateConfigService.UpdateConfigRequest;
import com.kaidi.oa.service.SystemUpdateService;
import com.kaidi.oa.service.SystemUpdateService.ReleaseHistoryItem;
import com.kaidi.oa.service.SystemUpdateService.UpdateStatus;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** Administrator-only API for checking and installing signed Gitea releases. */
@RestController
@RequestMapping("/api/oa/system-update")
@@ -46,6 +49,11 @@ public class SystemUpdateController {
return ApiResp.ok(updateService.status());
}
@GetMapping("/releases")
public ApiResp<List<ReleaseHistoryItem>> releases() {
return ApiResp.ok(updateService.releases());
}
@PostMapping("/check")
public ApiResp<UpdateStatus> check() {
return ApiResp.ok(updateService.check());