mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-06 03:48:45 +00:00
Refactor things
- Remove separate auth/logging and merge them into transport.go - Add helper function for http handlers
This commit is contained in:
parent
37b1c75045
commit
fa27d9c6eb
11 changed files with 547 additions and 1664 deletions
|
@ -3,15 +3,15 @@ package repo
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"bloat/kv"
|
||||
"bloat/util"
|
||||
"bloat/model"
|
||||
)
|
||||
|
||||
type appRepo struct {
|
||||
db *kv.Database
|
||||
db *util.Database
|
||||
}
|
||||
|
||||
func NewAppRepo(db *kv.Database) *appRepo {
|
||||
func NewAppRepo(db *util.Database) *appRepo {
|
||||
return &appRepo{
|
||||
db: db,
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@ package repo
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"bloat/kv"
|
||||
"bloat/util"
|
||||
"bloat/model"
|
||||
)
|
||||
|
||||
type sessionRepo struct {
|
||||
db *kv.Database
|
||||
db *util.Database
|
||||
}
|
||||
|
||||
func NewSessionRepo(db *kv.Database) *sessionRepo {
|
||||
func NewSessionRepo(db *util.Database) *sessionRepo {
|
||||
return &sessionRepo{
|
||||
db: db,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue