Skip to content

Commit

Permalink
Added status No content and Accepted as accepted responses for deleti…
Browse files Browse the repository at this point in the history
…ng Session.

Signed-off-by: Haligowska, Emilia <[email protected]>
  • Loading branch information
ehaligow committed Nov 10, 2022
1 parent b68d37c commit 2e2df48
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 2e2df48

Please sign in to comment.