Skip to content

Commit

Permalink
Merge pull request #38 from ehaligow/ehaligow-fix-for-Issue#17
Browse files Browse the repository at this point in the history
Added accepted responses for deleting session (fix for Issue #17)
  • Loading branch information
Maciej Miś authored Jan 18, 2023
2 parents aec7177 + 2e2df48 commit bdd2948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accountsService.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (s *Server) deleteDeviceSession(deviceIPAddress, authStr, userName string,
id, status, statusCode, err := s.getUserLoginID(deviceIPAddress, authStr, userName)
if err == nil && status == true {
_, statusCode, err = deleteHTTPDataByRfAPI(deviceIPAddress, RfSessionServiceSessions, userAuthData, id)
if statusCode != http.StatusOK {
if statusCode != http.StatusOK && statusCode != http.StatusNoContent && statusCode != http.StatusAccepted {
logrus.Errorf(ErrDeleteLoginFailed.String(id, strconv.Itoa(statusCode)))
return statusCode, errors.New(ErrDeleteLoginFailed.String(id, strconv.Itoa(statusCode)))
}
Expand Down

0 comments on commit bdd2948

Please sign in to comment.