]> source.dussan.org Git - gitea.git/commit
Fix init mail render logic (#20704)
authorKN4CK3R <admin@oldschoolhack.me>
Mon, 8 Aug 2022 18:04:28 +0000 (20:04 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Aug 2022 18:04:28 +0000 (20:04 +0200)
commit2b101994a6f4724500908226f9a55816062f1da6
treec13f682c0a3be130a5ee29a919ef292c41efee95
parentccf03e19c275057cf9b9c86f3ecfbc1fd60008f5
Fix init mail render logic (#20704)

This bug affects tests which are sending emails (#20307). Some tests reinitialise the web routes (like `TestNodeinfo`) which messed up the mail templates. There is no reason why the templates should be loaded in the routes method.
routers/web/web.go
services/mailer/mail.go
services/mailer/mail_test.go
services/mailer/mailer.go