Fixes 2: Fixing regression for issue 2
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
414bfb6aa1
commit
afcb80f913
13 changed files with 127 additions and 3 deletions
|
@ -23,6 +23,10 @@ const (
|
|||
// New is used to create a new Client to authenticate with
|
||||
// Photoprism.
|
||||
func New(connectionString string) *Client {
|
||||
for strings.HasSuffix(connectionString, "/") {
|
||||
connectionString = connectionString[:len(connectionString)-1]
|
||||
}
|
||||
|
||||
c := &Client{
|
||||
contentType: APIContentType,
|
||||
connectionString: connectionString,
|
||||
|
@ -30,6 +34,10 @@ func New(connectionString string) *Client {
|
|||
return c
|
||||
}
|
||||
|
||||
func (c *Client) ConnectionString() string {
|
||||
return c.connectionString
|
||||
}
|
||||
|
||||
// Client represents a client to a Photoprism application
|
||||
type Client struct {
|
||||
v1client *v1.V1Client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue