mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
fix(preheat): fix the swagger definition of preheat get log api
Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
parent
0921beaf4c
commit
4f95c4d067
@ -10,7 +10,6 @@ schemes:
|
||||
basePath: /api/v2.0
|
||||
produces:
|
||||
- application/json
|
||||
- text/plain
|
||||
consumes:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
@ -1360,7 +1359,9 @@ paths:
|
||||
description: Get the log text stream of the specified task for the given execution
|
||||
tags:
|
||||
- preheat
|
||||
operationId: GetLog
|
||||
operationId: GetPreheatLog
|
||||
produces:
|
||||
- text/plain
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestId'
|
||||
- $ref: '#/parameters/projectName'
|
||||
|
@ -704,8 +704,8 @@ func (api *preheatAPI) ListTasks(ctx context.Context, params operation.ListTasks
|
||||
WithLink(api.Links(ctx, params.HTTPRequest.URL, total, query.PageNumber, query.PageSize).String())
|
||||
}
|
||||
|
||||
// GetLog gets log.
|
||||
func (api *preheatAPI) GetLog(ctx context.Context, params operation.GetLogParams) middleware.Responder {
|
||||
// GetPreheatLog gets log.
|
||||
func (api *preheatAPI) GetPreheatLog(ctx context.Context, params operation.GetPreheatLogParams) middleware.Responder {
|
||||
if err := api.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionRead, rbac.ResourcePreatPolicy); err != nil {
|
||||
return api.SendError(ctx, err)
|
||||
}
|
||||
@ -715,7 +715,7 @@ func (api *preheatAPI) GetLog(ctx context.Context, params operation.GetLogParams
|
||||
return api.SendError(ctx, err)
|
||||
}
|
||||
|
||||
return operation.NewGetLogOK().WithPayload(string(l)).WithContentType("text/plain")
|
||||
return operation.NewGetPreheatLogOK().WithPayload(string(l))
|
||||
}
|
||||
|
||||
// ListProvidersUnderProject is Get all providers at project level
|
||||
|
Loading…
Reference in New Issue
Block a user