Skip to content

Commit

Permalink
Incompatible with Immich v1.118 (#510)
Browse files Browse the repository at this point in the history
Fixes #509
  • Loading branch information
simulot authored Oct 15, 2024
1 parent 7ee54ba commit bc05dd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
- [Github Sponsor page](https://github.com/sponsors/simulot)
- [paypal donor page](https://www.paypal.com/donate/?hosted_button_id=VGU2SQE88T2T4)

## Release 0.22.1

### Fixes:
- [#509](https://github.com/simulot/immich-go/issues/509)


## Release 0.22.0
Many thanks to @maybeanerd for their meticulous proofreading of the documentation files.

Expand Down
8 changes: 4 additions & 4 deletions immich/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ func NewImmichClient(endPoint string, key string, options ...clientOption) (*Imm
func (ic *ImmichClient) PingServer(ctx context.Context) error {
r := PingResponse{}
b := bytes.NewBuffer(nil)
err := ic.newServerCall(ctx, EndPointPingServer).do(getRequest("/server-info/ping", setAcceptJSON()), responseCopy(b), responseJSON(&r))
err := ic.newServerCall(ctx, EndPointPingServer).do(getRequest("/server/ping", setAcceptJSON()), responseCopy(b), responseJSON(&r))
if err != nil {
return fmt.Errorf("unexpected response to the immich's ping API at this address: %s:\n%s", ic.endPoint+"/server-info/ping", b.String())
return fmt.Errorf("unexpected response to the immich's ping API at this address: %s:\n%s", ic.endPoint+"/server/ping", b.String())
}
if r.Res != "pong" {
return fmt.Errorf("incorrect ping response: %s", r.Res)
Expand Down Expand Up @@ -163,7 +163,7 @@ type ServerStatistics struct {
func (ic *ImmichClient) GetServerStatistics(ctx context.Context) (ServerStatistics, error) {
var s ServerStatistics

err := ic.newServerCall(ctx, EndPointGetServerStatistics).do(getRequest("/server-info/statistics", setAcceptJSON()), responseJSON(&s))
err := ic.newServerCall(ctx, EndPointGetServerStatistics).do(getRequest("/server/statistics", setAcceptJSON()), responseJSON(&s))
return s, err
}

Expand Down Expand Up @@ -204,7 +204,7 @@ var DefaultSupportedMedia = SupportedMedia{
func (ic *ImmichClient) GetSupportedMediaTypes(ctx context.Context) (SupportedMedia, error) {
var s map[string][]string

err := ic.newServerCall(ctx, EndPointGetSupportedMediaTypes).do(getRequest("/server-info/media-types", setAcceptJSON()), responseJSON(&s))
err := ic.newServerCall(ctx, EndPointGetSupportedMediaTypes).do(getRequest("/server/media-types", setAcceptJSON()), responseJSON(&s))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit bc05dd9

Please sign in to comment.