mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 23:15:06 +00:00
Streams tenancy (#91)
* fixup streams stuff * use cache instead of pg in streams * hash out issuer streams test * fix compile error
This commit is contained in:
@@ -30,13 +30,7 @@ func (s *Streams) Token(ctx context.Context, req *pb.TokenRequest, rsp *pb.Token
|
||||
Account: getAccount(acc),
|
||||
}
|
||||
|
||||
dbConn, err := s.GetDBConn(ctx)
|
||||
if err != nil {
|
||||
logger.Errorf("Error creating token in store: %v", err)
|
||||
return errors.InternalServerError("DATABASE_ERROR", "Error writing token to database")
|
||||
}
|
||||
|
||||
if err := dbConn.Create(&t).Error; err != nil {
|
||||
if err := s.Cache.Put(t.Token, t, t.ExpiresAt); err != nil {
|
||||
logger.Errorf("Error creating token in store: %v", err)
|
||||
return errors.InternalServerError("DATABASE_ERROR", "Error writing token to database")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user