Skip to content

Commit 3cc5235

Browse files
authored
Trim trailing slash from folder queries using path (#22)
1 parent 2f80530 commit 3cc5235

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pleasant/pleasant.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ func GetIdByResourcePath(baseUrl, resourcePath, resourceType, bearerToken string
140140
return "", ErrInvalidResourceType
141141
}
142142

143+
if resourceType == "folder" {
144+
resourcePath = strings.TrimSuffix(resourcePath, "/")
145+
}
146+
143147
splitPath := strings.Split(resourcePath, "/")
144148

145149
if splitPath[0] != "Root" {

0 commit comments

Comments
 (0)