refactor(handler,server): disable SubmitApplication endpoint, replaced by POST /tasks

- Comment out SubmitApplication handler method

- Comment out route registration in server.go (interface + router + placeholder)

- Comment out related handler tests

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
dailz
2026-04-16 15:15:55 +08:00
parent 36d842350c
commit 7c374f4fd5
4 changed files with 20 additions and 8 deletions

View File

@@ -4,7 +4,6 @@ import (
"encoding/json"
"errors"
"strconv"
"strings"
"gcy_hpc_server/internal/model"
"gcy_hpc_server/internal/server"
@@ -139,7 +138,8 @@ func (h *ApplicationHandler) DeleteApplication(c *gin.Context) {
server.OK(c, gin.H{"message": "application deleted"})
}
func (h *ApplicationHandler) SubmitApplication(c *gin.Context) {
// [已禁用] 前端已全部迁移到 POST /tasks 接口,此端点不再使用。
/* func (h *ApplicationHandler) SubmitApplication(c *gin.Context) {
id, err := strconv.ParseInt(c.Param("id"), 10, 64)
if err != nil {
h.logger.Warn("invalid application id for submit", zap.String("id", c.Param("id")))
@@ -171,4 +171,4 @@ func (h *ApplicationHandler) SubmitApplication(c *gin.Context) {
}
h.logger.Info("application submitted", zap.Int64("id", id), zap.Int32("job_id", resp.JobID))
server.Created(c, resp)
}
} */