mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-24 09:42:36 +02:00
remove escaping for quote
not required anymore
This commit is contained in:
parent
7969ec305f
commit
b8619306e9
@ -50,7 +50,7 @@ func ArgsToForm(args []string) (*url.Values, error) {
|
||||
if len(r) != 2 {
|
||||
return nil, errors.New("args should be key=value")
|
||||
}
|
||||
params.Add(r[0], strings.ReplaceAll(r[1], "'", `\'`))
|
||||
params.Add(r[0], r[1])
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/celogeek/piwigo-cli/internal/piwigo/piwigotools"
|
||||
@ -176,7 +175,7 @@ func (p *Piwigo) ScanTree(
|
||||
category = &piwigotools.Category{}
|
||||
p.mu.Lock()
|
||||
err = p.Post("pwg.categories.add", &url.Values{
|
||||
"name": []string{strings.ReplaceAll(dirname, "'", `\'`)},
|
||||
"name": []string{dirname},
|
||||
"parent": []string{fmt.Sprint(parentCategoryId)},
|
||||
}, &category)
|
||||
p.mu.Unlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user