~sircmpwn/todo.sr.ht

eed9fe1752a216c886252c377eeb33cc1135fcc4 — Drew DeVault 5 months ago b5b4fbd 0.64.5
API: Add email queue
1 files changed, 4 insertions(+), 0 deletions(-)

M api/server.go
M api/server.go => api/server.go +4 -0
@@ 4,6 4,7 @@ import (
	"context"

	"git.sr.ht/~sircmpwn/core-go/config"
	"git.sr.ht/~sircmpwn/core-go/email"
	"git.sr.ht/~sircmpwn/core-go/server"
	"github.com/99designs/gqlgen/graphql"



@@ 29,9 30,12 @@ func main() {
		scopes[i] = s.String()
	}

	mail := email.NewQueue()
	server.NewServer("todo.sr.ht", appConfig).
		WithDefaultMiddleware().
		WithMiddleware(loaders.Middleware).
		WithMiddleware(email.Middleware(mail)).
		WithSchema(schema, scopes).
		WithQueues(mail).
		Run()
}