Skip to content

Commit c05b300

Browse files
drstrangelookertwishabansal
authored andcommitted
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.
1 parent de0ad03 commit c05b300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/tools/looker/lookercommon/lookercommon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func GetProjectFileContent(l *v4.LookerSDK, projectId string, filePath string, o
316316
var result string
317317
path := fmt.Sprintf("/projects/%s/file/content", url.PathEscape(projectId))
318318
query := map[string]any{
319-
"file_path": url.QueryEscape(filePath),
319+
"file_path": filePath,
320320
}
321321
err := l.AuthSession.Do(&result, "GET", "/4.0", path, query, nil, options)
322322
return result, err
@@ -325,7 +325,7 @@ func GetProjectFileContent(l *v4.LookerSDK, projectId string, filePath string, o
325325
func DeleteProjectFile(l *v4.LookerSDK, projectId string, filePath string, options *rtl.ApiSettings) error {
326326
path := fmt.Sprintf("/projects/%s/files", url.PathEscape(projectId))
327327
query := map[string]any{
328-
"file_path": url.QueryEscape(filePath),
328+
"file_path": filePath,
329329
}
330330
err := l.AuthSession.Do(nil, "DELETE", "/4.0", path, query, nil, options)
331331
return err

0 commit comments

Comments
 (0)