Let the lead keep notes on how its user works
This commit is contained in:
@@ -52,6 +52,24 @@ func (s *Server) MessageLead(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusAccepted, sess)
|
||||
}
|
||||
|
||||
func (s *Server) ListLeadNotes(w http.ResponseWriter, r *http.Request) {
|
||||
notes, err := s.store.LeadNotes(r.Context(), actor(r))
|
||||
if err != nil {
|
||||
writeStoreError(w, err)
|
||||
return
|
||||
}
|
||||
writeJSON(w, http.StatusOK, notes)
|
||||
}
|
||||
|
||||
func (s *Server) DeleteLeadNote(w http.ResponseWriter, r *http.Request, noteId string) {
|
||||
err := s.agents.DeleteLeadNote(r.Context(), actor(r), noteId)
|
||||
if err != nil {
|
||||
writeAgentError(w, err)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
}
|
||||
|
||||
func (s *Server) GetFocus(w http.ResponseWriter, r *http.Request) {
|
||||
f, err := s.store.GetFocus(r.Context(), actor(r))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user