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
+20
View File
@@ -0,0 +1,20 @@
package handlers_api
import (
"CatsOfMastodonBotGo/internal"
"github.com/gin-gonic/gin"
)
type ApiEndpointHandler struct {
AppContext *internal.AppContext
}
func NewApiEndpointHandler(appContext *internal.AppContext) *ApiEndpointHandler {
return &ApiEndpointHandler{
AppContext: appContext,
}
}
func (appContext *ApiEndpointHandler) GetRandomPost(c *gin.Context) {
c.JSON(200,appContext.AppContext.PostService.GetRandomPost())
}