Add user registration with password hashing and restructure handlers directory
This commit is contained in:
@@ -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>`))
|
||||
}
|
||||
Reference in New Issue
Block a user