From f95a752afa77506c147ba56a793a4228b1970ca9 Mon Sep 17 00:00:00 2001 From: nexryai <61890205+nexryai@users.noreply.github.com> Date: Mon, 15 Apr 2024 06:27:39 +0000 Subject: [PATCH] Refactor --- internal/router/summaly.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/router/summaly.go b/internal/router/summaly.go index 1e42d00..bc72d91 100644 --- a/internal/router/summaly.go +++ b/internal/router/summaly.go @@ -31,9 +31,7 @@ func SummalyRouter(app *fiber.App) { log.ErrorWithDetail("Error on Summarize():", err) ctx.Status(400) return ctx.SendString("Invalid URL") - } - - if summaly == nil { + } else if summaly == nil { log.Error("Result is nil. returning 500") ctx.Status(500) return ctx.SendString("Internal Server Error")