1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Make use of printer.Print when possible

This commit is contained in:
jvoisin 2024-02-27 17:19:38 +01:00 committed by Frédéric Guillot
parent b4ed17fbac
commit 5a7d6f8997
8 changed files with 22 additions and 22 deletions

View file

@ -81,7 +81,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) {
slog.String("oauth2_provider", provider),
slog.String("oauth2_profile_id", profile.ID),
)
sess.NewFlashErrorMessage(printer.Printf("error.duplicate_linked_account"))
sess.NewFlashErrorMessage(printer.Print("error.duplicate_linked_account"))
html.Redirect(w, r, route.Path(h.router, "settings"))
return
}
@ -92,7 +92,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) {
return
}
sess.NewFlashMessage(printer.Printf("alert.account_linked"))
sess.NewFlashMessage(printer.Print("alert.account_linked"))
html.Redirect(w, r, route.Path(h.router, "settings"))
return
}
@ -110,7 +110,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) {
}
if h.store.UserExists(profile.Username) {
html.BadRequest(w, r, errors.New(printer.Printf("error.user_already_exists")))
html.BadRequest(w, r, errors.New(printer.Print("error.user_already_exists")))
return
}