go: always defer adding headers
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
882b7dfd28
commit
4d10510f5b
@ -11,7 +11,7 @@ import (
|
||||
|
||||
func ManageAPIKeys() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
|
||||
func ManageUsers() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -159,7 +159,7 @@ func ManageUsers() echo.HandlerFunc {
|
||||
|
||||
func CreateUser() echo.HandlerFunc { //nolint:gocognit
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -270,7 +270,7 @@ func CreateUser() echo.HandlerFunc { //nolint:gocognit
|
||||
|
||||
func ViewUser() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -407,7 +407,7 @@ func ViewUser() echo.HandlerFunc {
|
||||
//nolint:dupl
|
||||
func EditUser() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -509,7 +509,7 @@ func EditUser() echo.HandlerFunc {
|
||||
//nolint:dupl
|
||||
func UpdateUser() echo.HandlerFunc { //nolint:gocognit
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -745,7 +745,7 @@ func UpdateUser() echo.HandlerFunc { //nolint:gocognit
|
||||
// DeleteUserConfirmation displays user deletion confirmation confirmation page.
|
||||
func DeleteUserConfirmation() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -846,7 +846,7 @@ func DeleteUserConfirmation() echo.HandlerFunc {
|
||||
// DeleteUser handles user deletion POST requests.
|
||||
func DeleteUser() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
|
||||
func GetSearchHIBP() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -92,7 +92,7 @@ func GetSearchHIBP() echo.HandlerFunc {
|
||||
|
||||
func SearchHIBP() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
|
||||
func InitialPasswordChangePost() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
@ -136,7 +136,7 @@ func InitialPasswordChangePost() echo.HandlerFunc {
|
||||
|
||||
func InitialPasswordChange() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
|
||||
func ViewHIBP() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
addHeaders(c)
|
||||
defer addHeaders(c)
|
||||
|
||||
u, ok := c.Get("sessUsr").(moduser.User)
|
||||
if !ok {
|
||||
|
Loading…
Reference in New Issue
Block a user