Access tokens, server, moving things
- Added placeholder funcs for access tokens - Moved an error definition and added another constant - Changed (passkey) auth fail to return a json error for now - TODO: Change that into checking for a provided access token before failing
This commit is contained in:
parent
4f761c20c0
commit
391d8b1b48
5 changed files with 56 additions and 6 deletions
|
@ -6,8 +6,6 @@
|
|||
package storage
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/mstarongitlab/linstrom/storage/cache"
|
||||
"gorm.io/driver/postgres"
|
||||
|
@ -21,8 +19,6 @@ type Storage struct {
|
|||
cache *cache.Cache
|
||||
}
|
||||
|
||||
var ErrInvalidData = errors.New("invalid data")
|
||||
|
||||
func NewStorage(dbUrl string, cache *cache.Cache) (*Storage, error) {
|
||||
db, err := gorm.Open(postgres.Open(dbUrl), &gorm.Config{
|
||||
Logger: newGormLogger(log.Logger),
|
||||
|
@ -39,6 +35,7 @@ func NewStorage(dbUrl string, cache *cache.Cache) (*Storage, error) {
|
|||
PasskeySession{},
|
||||
InboundJob{},
|
||||
OutboundJob{},
|
||||
AccessToken{},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue