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