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