Add user registration with password hashing and restructure handlers directory

This commit is contained in:
2025-05-15 12:10:16 +03:30
parent 7aa8c26da9
commit b3fae6b80c
12 changed files with 124 additions and 45 deletions
+21
View File
@@ -0,0 +1,21 @@
package handlers_home
import (
"CatsOfMastodonBotGo/internal"
"github.com/gin-gonic/gin"
)
type MainPageHandler struct {
AppContext *internal.AppContext
}
func NewMainPageHandler(appContext *internal.AppContext) *MainPageHandler {
return &MainPageHandler{
AppContext: appContext,
}
}
func (appContext *MainPageHandler) HomePageHandler(c *gin.Context) {
c.Data(200, "text/html; charset=utf-8", []byte(`<p>Welcome to CatsOfMastodonBotGo - <a href="https://git.mahdium.ir/mahdium/CatsOfMastodon">The main project</a>, writen in C# is available at that link - This is only my attempt to port it to Go for learning purposes</p>`))
}