Properly close store
This commit is contained in:
parent
709353b46e
commit
c15f3f70ab
1
main.go
1
main.go
|
@ -14,6 +14,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer db.Close()
|
||||
handlers := transport.New(db)
|
||||
// Auth endpoints
|
||||
mux.Group(func(mux *flow.Mux) {
|
||||
|
|
|
@ -34,6 +34,7 @@ type Storer interface {
|
|||
SessionUser(token string) (User, error)
|
||||
SaveOauthState(state OauthState) error
|
||||
OauthState(id string) (OauthState, error)
|
||||
Close() error
|
||||
}
|
||||
|
||||
type OauthState struct {
|
||||
|
@ -349,3 +350,7 @@ func (s *Store) OauthState(id string) (OauthState, error) {
|
|||
}
|
||||
return state, nil
|
||||
}
|
||||
|
||||
func (s *Store) Close() error {
|
||||
return s.database.Close()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue