From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [138.197.159.143]) by gnuweeb.org (Postfix) with ESMTPSA id 342137F750; Fri, 27 May 2022 20:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1653683967; bh=RKG+03kmbiIbSHm1Yp+M3IHpzKvN/OvYoB42QaJ+GH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GkBbxb71QtyQoUPpeAggdsMJsySbD5KYcoaU50yPHaBb0vOwTuWTfRNkGMHgghgdd 1izNTrUzpylWXBEAyVCmPfFQESBBKU/lXE4BU+HAUU/sFjvWyUDGrRNz/JUIS1Z6lZ xdb3UJ+PcXBjt0B0oYNpvaqM8GlVBC6PF9sak5lkdRosV5MFYOzgL+AIQJu5vgIpmB xvVMbtg2Etu+8mGj4of2jQv2d5BmsuOGrBMe8mwEPB3esCtuGEtCxY2EDWwOexpTav ZcZ6eCO9oPWZhs6CWjVBZe4WhR1/+0bUOT7/WKhZYe+xpvVryPhKi/CV3UU7i51CUH 0nfGWU1mG4sQw== From: Alviro Iskandar Setiawan To: Fernanda Ma'rouf , Akiekano Cc: Alviro Iskandar Setiawan , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH buubuu v1 5/5] server: auth: Create `/login` route Date: Fri, 27 May 2022 20:39:20 +0000 Message-Id: <20220527203920.2474126-5-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Add these two routes: /auth/login POST authController.Register /auth/login GET authController.login for the login page and API endpoint. Signed-off-by: Alviro Iskandar Setiawan --- server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.go b/server.go index 3042fd5..14ffff6 100644 --- a/server.go +++ b/server.go @@ -30,6 +30,8 @@ func main() { { authRoutes.POST("/register", authController.Register) authRoutes.GET("/register", authController.Register) + authRoutes.POST("/login", authController.Login) + authRoutes.GET("/login", authController.Login) // authRoutes.GET("/register", check) // authRoutes.GET("/register", func(c *gin.Context) { -- Alviro Iskandar Setiawan