Some checks failed
/ test (push) Has been cancelled
Wait, what's this? A new commit to Linstrom? And I thought I was done for good with this project now that I've left Fedi. Well, I got bored at work and inspired by a random bit I've seen in Elixir Phoenix's docs. So here is the start of a new subsystem: Authentication Intended to bundle all authentication related checks and updates in one place. Http handlers should not be the ones to perform the logic, too much duplication. Technically, they probably shouldn't even contain any business logic at all, only calling it and transforming it into visible output Also may be considering switching to Vue or at least changing how the ember frontend interacts with the backend
11 lines
156 B
Go
11 lines
156 B
Go
package auth
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type Authentication struct {
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewAuth(db *gorm.DB) *Authentication {
|
|
return &Authentication{db}
|
|
}
|