// FetchSessions retrieves all sessions of the same user.
FetchSessions retrieves all sessions of the same user.
// FetchSessions retrieves all sessions of the same user .
func (h *Handler) FetchSessions(w http.ResponseWriter, r *http.Request) {
	ss, err := h.session.manager.FetchAll(r.Context())
	if err != nil {
		httpflow.RespondError(h.log, w, r, err)
		return
	}
	if len(ss) == 0 {
		httpflow.RespondError(h.log, w, r, httpflow.ErrNotFound)
		return
	}
	httpflow.Respond(h.log, w, r, ss, http.StatusOK)
}
func ( h * Handler ) FetchSessions ( w http . ResponseWriter , r * http . Request ) { ss , err := h . session . manager . FetchAll ( r . Context ( ) ) if err != nil { httpflow . RespondError ( h . log , w , r , err ) return } if len ( ss ) == 0 { httpflow . RespondError ( h . log , w , r , httpflow . ErrNotFound ) return } httpflow . Respond ( h . log , w , r , ss , http . StatusOK ) }
FetchSessions retrieves all sessions of the same user.
FetchSessions retrieves all sessions of the same user .