portainer/portainer

View on GitHub
api/http/handler/gitops/git_repo_file_preview.go

Summary

Maintainability
A
40 mins
Test Coverage

Method Handler.gitOperationRepoFilePreview has 6 return statements (exceeds 4 allowed).
Open

func (handler *Handler) gitOperationRepoFilePreview(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
    var payload repositoryFilePreviewPayload
    err := request.DecodeAndValidateJSONPayload(r, &payload)
    if err != nil {
        return httperror.BadRequest("Invalid request payload", err)
Severity: Major
Found in api/http/handler/gitops/git_repo_file_preview.go - About 40 mins to fix

    There are no issues that match your filters.

    Category
    Status