Skip to content

Commit 1490ed7

Browse files
authored
dev:修复注释路由前缀 (#8292)
1 parent 48b3032 commit 1490ed7

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

backend/app/api/v1/host_tool.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// @Success 200 {object} response.HostToolRes
1515
// @Security ApiKeyAuth
1616
// @Security Timestamp
17-
// @Router /host/tool [post]
17+
// @Router /hosts/tool [post]
1818
func (b *BaseApi) GetToolStatus(c *gin.Context) {
1919
var req request.HostToolReq
2020
if err := helper.CheckBindAndValidate(&req, c); err != nil {
@@ -36,7 +36,7 @@ func (b *BaseApi) GetToolStatus(c *gin.Context) {
3636
// @Success 200
3737
// @Security ApiKeyAuth
3838
// @Security Timestamp
39-
// @Router /host/tool/create [post]
39+
// @Router /hosts/tool/create [post]
4040
// @x-panel-log {"bodyKeys":["type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建 [type] 配置","formatEN":"create [type] config"}
4141
func (b *BaseApi) InitToolConfig(c *gin.Context) {
4242
var req request.HostToolCreate
@@ -58,7 +58,7 @@ func (b *BaseApi) InitToolConfig(c *gin.Context) {
5858
// @Success 200
5959
// @Security ApiKeyAuth
6060
// @Security Timestamp
61-
// @Router /host/tool/operate [post]
61+
// @Router /hosts/tool/operate [post]
6262
// @x-panel-log {"bodyKeys":["operate","type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] [type] ","formatEN":"[operate] [type]"}
6363
func (b *BaseApi) OperateTool(c *gin.Context) {
6464
var req request.HostToolReq
@@ -80,7 +80,7 @@ func (b *BaseApi) OperateTool(c *gin.Context) {
8080
// @Success 200 {object} response.HostToolConfig
8181
// @Security ApiKeyAuth
8282
// @Security Timestamp
83-
// @Router /host/tool/config [post]
83+
// @Router /hosts/tool/config [post]
8484
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 主机工具配置文件 ","formatEN":"[operate] tool config"}
8585
func (b *BaseApi) OperateToolConfig(c *gin.Context) {
8686
var req request.HostToolConfig
@@ -103,7 +103,7 @@ func (b *BaseApi) OperateToolConfig(c *gin.Context) {
103103
// @Success 200 {string} logContent
104104
// @Security ApiKeyAuth
105105
// @Security Timestamp
106-
// @Router /host/tool/log [post]
106+
// @Router /hosts/tool/log [post]
107107
func (b *BaseApi) GetToolLog(c *gin.Context) {
108108
var req request.HostToolLogReq
109109
if err := helper.CheckBindAndValidate(&req, c); err != nil {
@@ -125,7 +125,7 @@ func (b *BaseApi) GetToolLog(c *gin.Context) {
125125
// @Success 200
126126
// @Security ApiKeyAuth
127127
// @Security Timestamp
128-
// @Router /host/tool/supervisor/process [post]
128+
// @Router /hosts/tool/supervisor/process [post]
129129
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 守护进程 ","formatEN":"[operate] process"}
130130
func (b *BaseApi) OperateProcess(c *gin.Context) {
131131
var req request.SupervisorProcessConfig
@@ -147,7 +147,7 @@ func (b *BaseApi) OperateProcess(c *gin.Context) {
147147
// @Success 200 {object} response.SupervisorProcessConfig
148148
// @Security ApiKeyAuth
149149
// @Security Timestamp
150-
// @Router /host/tool/supervisor/process [get]
150+
// @Router /hosts/tool/supervisor/process [get]
151151
func (b *BaseApi) GetProcess(c *gin.Context) {
152152
configs, err := hostToolService.GetSupervisorProcessConfig()
153153
if err != nil {
@@ -164,7 +164,7 @@ func (b *BaseApi) GetProcess(c *gin.Context) {
164164
// @Success 200 {string} content
165165
// @Security ApiKeyAuth
166166
// @Security Timestamp
167-
// @Router /host/tool/supervisor/process/file [post]
167+
// @Router /hosts/tool/supervisor/process/file [post]
168168
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] Supervisor 进程文件 ","formatEN":"[operate] Supervisor Process Config file"}
169169
func (b *BaseApi) GetProcessFile(c *gin.Context) {
170170
var req request.SupervisorProcessFileReq

backend/app/api/v1/ssh.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
// @Success 200 {object} dto.SSHInfo
1313
// @Security ApiKeyAuth
1414
// @Security Timestamp
15-
// @Router /host/ssh/search [post]
15+
// @Router /hosts/ssh/search [post]
1616
func (b *BaseApi) GetSSHInfo(c *gin.Context) {
1717
info, err := sshService.GetSSHInfo()
1818
if err != nil {
@@ -29,7 +29,7 @@ func (b *BaseApi) GetSSHInfo(c *gin.Context) {
2929
// @Success 200
3030
// @Security ApiKeyAuth
3131
// @Security Timestamp
32-
// @Router /host/ssh/operate [post]
32+
// @Router /hosts/ssh/operate [post]
3333
// @x-panel-log {"bodyKeys":["operation"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operation] SSH ","formatEN":"[operation] SSH"}
3434
func (b *BaseApi) OperateSSH(c *gin.Context) {
3535
var req dto.Operate
@@ -51,7 +51,7 @@ func (b *BaseApi) OperateSSH(c *gin.Context) {
5151
// @Success 200
5252
// @Security ApiKeyAuth
5353
// @Security Timestamp
54-
// @Router /host/ssh/update [post]
54+
// @Router /hosts/ssh/update [post]
5555
// @x-panel-log {"bodyKeys":["key","value"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [value]","formatEN":"update SSH setting [key] => [value]"}
5656
func (b *BaseApi) UpdateSSH(c *gin.Context) {
5757
var req dto.SSHUpdate
@@ -73,7 +73,7 @@ func (b *BaseApi) UpdateSSH(c *gin.Context) {
7373
// @Success 200
7474
// @Security ApiKeyAuth
7575
// @Security Timestamp
76-
// @Router /host/conffile/update [post]
76+
// @Router /hosts/conffile/update [post]
7777
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置文件","formatEN":"update SSH conf"}
7878
func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
7979
var req dto.SSHConf
@@ -95,7 +95,7 @@ func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
9595
// @Success 200
9696
// @Security ApiKeyAuth
9797
// @Security Timestamp
98-
// @Router /host/ssh/generate [post]
98+
// @Router /hosts/ssh/generate [post]
9999
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"生成 SSH 密钥 ","formatEN":"generate SSH secret"}
100100
func (b *BaseApi) GenerateSSH(c *gin.Context) {
101101
var req dto.GenerateSSH
@@ -117,7 +117,7 @@ func (b *BaseApi) GenerateSSH(c *gin.Context) {
117117
// @Success 200 {string} data
118118
// @Security ApiKeyAuth
119119
// @Security Timestamp
120-
// @Router /host/ssh/secret [post]
120+
// @Router /hosts/ssh/secret [post]
121121
func (b *BaseApi) LoadSSHSecret(c *gin.Context) {
122122
var req dto.GenerateLoad
123123
if err := helper.CheckBindAndValidate(&req, c); err != nil {
@@ -139,7 +139,7 @@ func (b *BaseApi) LoadSSHSecret(c *gin.Context) {
139139
// @Success 200 {object} dto.SSHLog
140140
// @Security ApiKeyAuth
141141
// @Security Timestamp
142-
// @Router /host/ssh/log [post]
142+
// @Router /hosts/ssh/log [post]
143143
func (b *BaseApi) LoadSSHLogs(c *gin.Context) {
144144
var req dto.SearchSSHLog
145145
if err := helper.CheckBindAndValidate(&req, c); err != nil {
@@ -159,7 +159,7 @@ func (b *BaseApi) LoadSSHLogs(c *gin.Context) {
159159
// @Success 200 {string} data
160160
// @Security ApiKeyAuth
161161
// @Security Timestamp
162-
// @Router /host/ssh/conf [get]
162+
// @Router /hosts/ssh/conf [get]
163163
func (b *BaseApi) LoadSSHConf(c *gin.Context) {
164164
data, err := sshService.LoadSSHConf()
165165
if err != nil {

0 commit comments

Comments
 (0)