@@ -12,8 +12,9 @@ import (
1212// @Summary Page app installed
1313// @Accept json
1414// @Param request body request.AppInstalledSearch true "request"
15- // @Success 200
15+ // @Success 200 {object} dto.PageResult
1616// @Security ApiKeyAuth
17+ // @Security Timestamp
1718// @Router /apps/installed/search [post]
1819func (b * BaseApi ) SearchAppInstalled (c * gin.Context ) {
1920 var req request.AppInstalledSearch
@@ -43,8 +44,9 @@ func (b *BaseApi) SearchAppInstalled(c *gin.Context) {
4344// @Tags App
4445// @Summary List app installed
4546// @Accept json
46- // @Success 200 array dto.AppInstallInfo
47+ // @Success 200 { array} dto.AppInstallInfo
4748// @Security ApiKeyAuth
49+ // @Security Timestamp
4850// @Router /apps/installed/list [get]
4951func (b * BaseApi ) ListAppInstalled (c * gin.Context ) {
5052 list , err := appInstallService .GetInstallList ()
@@ -61,6 +63,7 @@ func (b *BaseApi) ListAppInstalled(c *gin.Context) {
6163// @Param request body request.AppInstalledInfo true "request"
6264// @Success 200 {object} response.AppInstalledCheck
6365// @Security ApiKeyAuth
66+ // @Security Timestamp
6467// @Router /apps/installed/check [post]
6568func (b * BaseApi ) CheckAppInstalled (c * gin.Context ) {
6669 var req request.AppInstalledInfo
@@ -81,6 +84,7 @@ func (b *BaseApi) CheckAppInstalled(c *gin.Context) {
8184// @Param request body dto.OperationWithNameAndType true "request"
8285// @Success 200 {integer} port
8386// @Security ApiKeyAuth
87+ // @Security Timestamp
8488// @Router /apps/installed/loadport [post]
8589func (b * BaseApi ) LoadPort (c * gin.Context ) {
8690 var req dto.OperationWithNameAndType
@@ -99,8 +103,9 @@ func (b *BaseApi) LoadPort(c *gin.Context) {
99103// @Summary Search app password by key
100104// @Accept json
101105// @Param request body dto.OperationWithNameAndType true "request"
102- // @Success 200 {string } response.DatabaseConn
106+ // @Success 200 {object } response.DatabaseConn
103107// @Security ApiKeyAuth
108+ // @Security Timestamp
104109// @Router /apps/installed/conninfo/:key [get]
105110func (b * BaseApi ) LoadConnInfo (c * gin.Context ) {
106111 var req dto.OperationWithNameAndType
@@ -121,6 +126,7 @@ func (b *BaseApi) LoadConnInfo(c *gin.Context) {
121126// @Param appInstallId path integer true "App install id"
122127// @Success 200 {array} dto.AppResource
123128// @Security ApiKeyAuth
129+ // @Security Timestamp
124130// @Router /apps/installed/delete/check/:appInstallId [get]
125131func (b * BaseApi ) DeleteCheck (c * gin.Context ) {
126132 appInstallId , err := helper .GetIntParamByKey (c , "appInstallId" )
@@ -141,14 +147,15 @@ func (b *BaseApi) DeleteCheck(c *gin.Context) {
141147// @Summary Sync app installed
142148// @Success 200
143149// @Security ApiKeyAuth
150+ // @Security Timestamp
144151// @Router /apps/installed/sync [post]
145152// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"同步已安装应用列表","formatEN":"Sync the list of installed apps"}
146153func (b * BaseApi ) SyncInstalled (c * gin.Context ) {
147154 if err := appInstallService .SyncAll (false ); err != nil {
148155 helper .InternalServer (c , err )
149156 return
150157 }
151- helper .SuccessWithData ( c , "" )
158+ helper .SuccessWithOutData ( c )
152159}
153160
154161// @Tags App
@@ -157,6 +164,7 @@ func (b *BaseApi) SyncInstalled(c *gin.Context) {
157164// @Param request body request.AppInstalledOperate true "request"
158165// @Success 200
159166// @Security ApiKeyAuth
167+ // @Security Timestamp
160168// @Router /apps/installed/op [post]
161169// @x-panel-log {"bodyKeys":["installId","operate"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"app_id","output_value":"appId"},{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"name","output_value":"appName"},{"input_column":"id","input_value":"appId","isList":false,"db":"apps","output_column":"key","output_value":"appKey"}],"formatZH":"[operate] 应用 [appKey][appName]","formatEN":"[operate] App [appKey][appName]"}
162170func (b * BaseApi ) OperateInstalled (c * gin.Context ) {
@@ -168,7 +176,7 @@ func (b *BaseApi) OperateInstalled(c *gin.Context) {
168176 helper .InternalServer (c , err )
169177 return
170178 }
171- helper .SuccessWithData ( c , nil )
179+ helper .SuccessWithOutData ( c )
172180}
173181
174182// @Tags App
@@ -177,6 +185,7 @@ func (b *BaseApi) OperateInstalled(c *gin.Context) {
177185// @Param key path string true "request"
178186// @Success 200 {array} response.AppService
179187// @Security ApiKeyAuth
188+ // @Security Timestamp
180189// @Router /apps/services/:key [get]
181190func (b * BaseApi ) GetServices (c * gin.Context ) {
182191 key := c .Param ("key" )
@@ -194,6 +203,7 @@ func (b *BaseApi) GetServices(c *gin.Context) {
194203// @Param appInstallId path integer true "request"
195204// @Success 200 {array} dto.AppVersion
196205// @Security ApiKeyAuth
206+ // @Security Timestamp
197207// @Router /apps/installed/update/versions [post]
198208func (b * BaseApi ) GetUpdateVersions (c * gin.Context ) {
199209 var req request.AppUpdateVersion
@@ -214,6 +224,7 @@ func (b *BaseApi) GetUpdateVersions(c *gin.Context) {
214224// @Param request body request.PortUpdate true "request"
215225// @Success 200
216226// @Security ApiKeyAuth
227+ // @Security Timestamp
217228// @Router /apps/installed/port/change [post]
218229// @x-panel-log {"bodyKeys":["key","name","port"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"应用端口修改 [key]-[name] => [port]","formatEN":"Application port update [key]-[name] => [port]"}
219230func (b * BaseApi ) ChangeAppPort (c * gin.Context ) {
@@ -225,7 +236,7 @@ func (b *BaseApi) ChangeAppPort(c *gin.Context) {
225236 helper .InternalServer (c , err )
226237 return
227238 }
228- helper .SuccessWithData ( c , nil )
239+ helper .SuccessWithOutData ( c )
229240}
230241
231242// @Tags App
@@ -234,6 +245,7 @@ func (b *BaseApi) ChangeAppPort(c *gin.Context) {
234245// @Param request body dto.OperationWithNameAndType true "request"
235246// @Success 200 {string} content
236247// @Security ApiKeyAuth
248+ // @Security Timestamp
237249// @Router /apps/installed/conf [post]
238250func (b * BaseApi ) GetDefaultConfig (c * gin.Context ) {
239251 var req dto.OperationWithNameAndType
@@ -253,8 +265,9 @@ func (b *BaseApi) GetDefaultConfig(c *gin.Context) {
253265// @Summary Search params by appInstallId
254266// @Accept json
255267// @Param appInstallId path string true "request"
256- // @Success 200 {object} response.AppParam
268+ // @Success 200 {object} response.AppConfig
257269// @Security ApiKeyAuth
270+ // @Security Timestamp
258271// @Router /apps/installed/params/:appInstallId [get]
259272func (b * BaseApi ) GetParams (c * gin.Context ) {
260273 appInstallId , err := helper .GetIntParamByKey (c , "appInstallId" )
@@ -276,6 +289,7 @@ func (b *BaseApi) GetParams(c *gin.Context) {
276289// @Param request body request.AppInstalledUpdate true "request"
277290// @Success 200
278291// @Security ApiKeyAuth
292+ // @Security Timestamp
279293// @Router /apps/installed/params/update [post]
280294// @x-panel-log {"bodyKeys":["installId"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"应用参数修改 [installId]","formatEN":"Application param update [installId]"}
281295func (b * BaseApi ) UpdateInstalled (c * gin.Context ) {
@@ -287,7 +301,7 @@ func (b *BaseApi) UpdateInstalled(c *gin.Context) {
287301 helper .InternalServer (c , err )
288302 return
289303 }
290- helper .SuccessWithData ( c , nil )
304+ helper .SuccessWithOutData ( c )
291305}
292306
293307// @Tags App
@@ -296,6 +310,7 @@ func (b *BaseApi) UpdateInstalled(c *gin.Context) {
296310// @Param request body request.AppInstalledIgnoreUpgrade true "request"
297311// @Success 200
298312// @Security ApiKeyAuth
313+ // @Security Timestamp
299314// @Router /apps/installed/ignore [post]
300315// @x-panel-log {"bodyKeys":["installId"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"忽略应用 [installId] 版本升级","formatEN":"Application param update [installId]"}
301316func (b * BaseApi ) IgnoreUpgrade (c * gin.Context ) {
@@ -316,6 +331,7 @@ func (b *BaseApi) IgnoreUpgrade(c *gin.Context) {
316331// @Param request body request.AppConfigUpdate true "request"
317332// @Success 200
318333// @Security ApiKeyAuth
334+ // @Security Timestamp
319335// @Router /apps/installed/config/update [post]
320336// @x-panel-log {"bodyKeys":["installID","webUI"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"应用配置更新 [installID]","formatEN":"Application config update [installID]"}
321337func (b * BaseApi ) UpdateAppConfig (c * gin.Context ) {
0 commit comments