API: Add email queue
This commit is contained in:
parent
b5b4fbd983
commit
eed9fe1752
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue