Skip to content

Commit

Permalink
refactor(api): update integrations status endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
AiraNadih authored Oct 15, 2024
1 parent 08aca66 commit c9dd59c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func (c *Client) MarkAllAsRead(userID int64) error {
}

// FetchIntegrationsStatus fetches the integrations status for a user.
func (c *Client) FetchIntegrationsStatus(userID int64) (bool, error) {
body, err := c.request.Get(fmt.Sprintf("/v1/users/%d/integrations/status", userID))
func (c *Client) FetchIntegrationsStatus() (bool, error) {
body, err := c.request.Get(fmt.Sprintf("/v1/users/integrations/status"))

Check failure on line 190 in client/client.go

View workflow job for this annotation

GitHub Actions / Golang Linters

S1039: unnecessary use of fmt.Sprintf (gosimple)
if err != nil {
return false, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/api/api_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2499,7 +2499,7 @@ func TestFetchIntegrationsStatusEndpoint(t *testing.T) {

regularUserClient := miniflux.NewClient(testConfig.testBaseURL, regularTestUser.Username, testConfig.testRegularPassword)

hasIntegrations, err := regularUserClient.FetchIntegrationsStatus(regularTestUser.ID)
hasIntegrations, err := regularUserClient.FetchIntegrationsStatus()
if err != nil {
t.Fatalf("Failed to fetch integrations status: %v", err)
}
Expand Down

0 comments on commit c9dd59c

Please sign in to comment.