File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,10 +119,6 @@ func UpdateProfile(c *fiber.Ctx) error {
119119 // location := c.FormValue("location")
120120 // url := c.FormValue("url")
121121
122- // debugging
123- fmt .Println ("Description:" , description )
124- fmt .Println ("Name:" , name )
125-
126122 // some quality of life features
127123 description = strings .ReplaceAll (description , "\\ n" , "\n " )
128124
Original file line number Diff line number Diff line change 11package twitterv1
22
33import (
4- "fmt"
5-
64 blueskyapi "github.com/Preloading/MastodonTwitterAPI/bluesky"
75 "github.com/Preloading/MastodonTwitterAPI/config"
86 "github.com/gofiber/fiber/v2"
@@ -22,14 +20,16 @@ func InitServer(config *config.Config) {
2220 app .Use (logger .New ())
2321
2422 // Custom middleware to log request details
25- app .Use (func (c * fiber.Ctx ) error {
26- // fmt.Println("Request Method:", c.Method())
27- fmt .Println ("Request URL:" , c .OriginalURL ())
28- fmt .Println ("Post Body:" , string (c .Body ()))
29- // fmt.Println("Headers:", string(c.Request().Header.Header()))
30- // fmt.Println()
31- return c .Next ()
32- })
23+ if config .DeveloperMode {
24+ app .Use (func (c * fiber.Ctx ) error {
25+ // fmt.Println("Request Method:", c.Method())
26+ // fmt.Println("Request URL:", c.OriginalURL())
27+ // fmt.Println("Post Body:", string(c.Body()))
28+ // fmt.Println("Headers:", string(c.Request().Header.Header()))
29+ // fmt.Println()
30+ return c .Next ()
31+ })
32+ }
3333
3434 // app.Get("/", func(c *fiber.Ctx) error {
3535 // return c.SendString("Hello, World!")
You can’t perform that action at this time.
0 commit comments