From 68a31df2e88936ed3a0631467750db3ca5808bdc Mon Sep 17 00:00:00 2001 From: pluja Date: Sun, 12 Nov 2023 22:13:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20refactor(handlers=5Fweb.go):=20r?= =?UTF-8?q?emove=20commented=20out=20code=20related=20to=20testing=20and?= =?UTF-8?q?=20updating=20ToS=20highlights=20=F0=9F=90=9B=20fix(handlers=5F?= =?UTF-8?q?web.go):=20remove=20unused=20code=20for=20updating=20ToS=20high?= =?UTF-8?q?lights=20in=20the=20handleService=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/handlers_web.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/server/handlers_web.go b/src/server/handlers_web.go index 97d13f4..090a5dc 100644 --- a/src/server/handlers_web.go +++ b/src/server/handlers_web.go @@ -106,25 +106,6 @@ func (s *Server) handleService(c *fiber.Ctx) error { return c.Status(fiber.StatusInternalServerError).SendString("Internal Server Error") } - // TESTING - //log.Printf("ToS: %v", service.TosHighlights) - //if service.TosHighlights == nil { - // tos, err := tos_scraper.GetBodyHtml(service.TosUrls[0]) - // if err != nil { - // log.Error().Err(err).Msg("Could not scrape ToS") - // } - // highlights, err := ai.GetTosHighlights(tos) - // if err != nil { - // log.Error().Err(err).Msg("Could not parse ToS") - // } - // log.Printf("%+v", highlights) - // - // if service.TosHighlights == nil { - // database.Client.Service.UpdateOne(service).SetTosHighlights(&highlights).Save(context.Background()) - // } - // service.TosHighlights = &highlights - //} - // Update score in background upd := c.Query("update", "") if upd == "true" {