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

View File

@@ -31,10 +31,14 @@ func SetupAppContext() *internal.AppContext {
//Setup PostService
var postService = services.NewPostService(db)
// Setup UserService
var userService = services.NewUserService(db)
// Inititlize AppContext
var appContext = &internal.AppContext{
Db: db,
PostService: postService,
UserService: userService,
Instance: instance,
Tag: tag,
}

View File

@@ -7,7 +7,7 @@ import (
)
func AddMigrations(db *gorm.DB) {
db.AutoMigrate(&models.Post{}, &models.MediaAttachment{}, &models.Account{})
db.AutoMigrate(&models.Post{}, &models.MediaAttachment{}, &models.Account{}, models.ComUser{})
}