fix(tools/looker): looker file content calls should not use url.QueryEscape (#1758)

## Description

The file_path parameter for the get_project_file and delete_project_file
calls should not be url encoded.
This commit is contained in:
Dr. Strangelove
2025-10-21 14:29:38 -04:00
committed by GitHub
parent 5010a69a0e
commit 336de1bd04

View File

@@ -316,7 +316,7 @@ func GetProjectFileContent(l *v4.LookerSDK, projectId string, filePath string, o
var result string
path := fmt.Sprintf("/projects/%s/file/content", url.PathEscape(projectId))
query := map[string]any{
"file_path": url.QueryEscape(filePath),
"file_path": filePath,
}
err := l.AuthSession.Do(&result, "GET", "/4.0", path, query, nil, options)
return result, err
@@ -325,7 +325,7 @@ func GetProjectFileContent(l *v4.LookerSDK, projectId string, filePath string, o
func DeleteProjectFile(l *v4.LookerSDK, projectId string, filePath string, options *rtl.ApiSettings) error {
path := fmt.Sprintf("/projects/%s/files", url.PathEscape(projectId))
query := map[string]any{
"file_path": url.QueryEscape(filePath),
"file_path": filePath,
}
err := l.AuthSession.Do(nil, "DELETE", "/4.0", path, query, nil, options)
return err