diff --git a/cmd/server/server.go b/cmd/server/server.go index 4ef67c0..33479d8 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -22,7 +22,7 @@ func init() { flag.Parse() config.ParseConfig(*flagConfig) - comm := comm.InitializeCommProvider() + comm := comm.InitCommunicator() db, err := db.New(config.Config()) if err != nil { log.Panicf("failed to initialize database: %v", err) diff --git a/internal/canvaslms/handler.go b/internal/canvaslms/handler.go index 25b8d56..faf9f01 100644 --- a/internal/canvaslms/handler.go +++ b/internal/canvaslms/handler.go @@ -14,7 +14,7 @@ import ( "github.com/eternal-flame-AD/yoake/config" "github.com/eternal-flame-AD/yoake/internal/auth" - "github.com/eternal-flame-AD/yoake/internal/comm" + "github.com/eternal-flame-AD/yoake/internal/comm/model" "github.com/eternal-flame-AD/yoake/internal/echoerror" "github.com/labstack/echo/v4" ) @@ -25,7 +25,7 @@ type Handler struct { respCache *responseCache respCacheMutex sync.RWMutex refreshPeriod time.Duration - comm *comm.CommProvider + comm model.Communicator } type GetGradesResponse struct { @@ -238,7 +238,7 @@ type responseCache struct { submissionLastUpdate map[string]time.Time } -func Register(g *echo.Group, comm *comm.CommProvider) (h *Handler, err error) { +func Register(g *echo.Group, comm model.Communicator) (h *Handler, err error) { h = &Handler{conf: config.Config().CanvasLMS, comm: comm} if h.conf.Token == "" { return nil, errors.New("canvas token not set")