mirror of
				https://github.com/abhinavxd/libredesk.git
				synced 2025-11-03 21:43:35 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			367 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			367 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package main
 | 
						|
 | 
						|
import (
 | 
						|
	"net/http"
 | 
						|
 | 
						|
	"github.com/zerodha/fastglue"
 | 
						|
)
 | 
						|
 | 
						|
func handleGetCannedResponses(r *fastglue.Request) error {
 | 
						|
	var (
 | 
						|
		app = r.Context.(*App)
 | 
						|
	)
 | 
						|
	c, err := app.cannedResp.GetAllCannedResponses()
 | 
						|
	if err != nil {
 | 
						|
		return r.SendErrorEnvelope(http.StatusInternalServerError, "Error fetching canned responses", nil, "")
 | 
						|
	}
 | 
						|
	return r.SendEnvelope(c)
 | 
						|
}
 |