~sircmpwn/todo.sr.ht

09e84258180f216fac33473cfcdb606ca81db5d7 — Drew DeVault 4 months ago b779e21 0.64.10
API: fix ACL field for trackerByName
2 files changed, 5 insertions(+), 2 deletions(-)

M api/loaders/middleware.go
M api/server.go
M api/loaders/middleware.go => api/loaders/middleware.go +1 -0
@@ 236,6 236,7 @@ func fetchTrackersByName(ctx context.Context) func(names []string) ([]*model.Tra
				if err := rows.Scan(database.Scan(ctx, &tracker)...); err != nil {
					return err
				}
				tracker.Access = model.ACCESS_ALL
				trackersByName[tracker.Name] = &tracker
			}
			if err = rows.Err(); err != nil {

M api/server.go => api/server.go +4 -2
@@ 33,8 33,10 @@ func main() {
	mail := email.NewQueue()
	server.NewServer("todo.sr.ht", appConfig).
		WithDefaultMiddleware().
		WithMiddleware(loaders.Middleware).
		WithMiddleware(email.Middleware(mail)).
		WithMiddleware(
			loaders.Middleware,
			email.Middleware(mail),
		).
		WithSchema(schema, scopes).
		WithQueues(mail).
		Run()