added a bit of zap logging
Some checks failed
Build and Push Docker Image / Build image (push) Failing after 58s
Some checks failed
Build and Push Docker Image / Build image (push) Failing after 58s
This commit is contained in:
@@ -170,6 +170,11 @@ func (i *InviteTokenDbHandler) SaveInviteToken(ctx context.Context, email string
|
||||
return token, nil
|
||||
}
|
||||
|
||||
func (i *InviteTokenDbHandler) DeleteInviteToken(ctx context.Context, token string) error {
|
||||
_, err := i.collection.DeleteOne(ctx, bson.M{"token": token})
|
||||
return err
|
||||
}
|
||||
|
||||
func (i *InviteTokenDbHandler) GetInviteToken(ctx context.Context, token string) (*dbhandler.InviteToken, error) {
|
||||
var inviteToken InviteToken
|
||||
err := i.collection.FindOne(ctx, bson.M{"token": token}).Decode(&inviteToken)
|
||||
|
@@ -40,4 +40,5 @@ type UserPassAuthanticationDbHandler interface {
|
||||
type InviteTokenDbHandler interface {
|
||||
SaveInviteToken(ctx context.Context, email string, permissions models.Permission) (string, error)
|
||||
GetInviteToken(ctx context.Context, token string) (*InviteToken, error)
|
||||
DeleteInviteToken(ctx context.Context, token string) error
|
||||
}
|
||||
|
Reference in New Issue
Block a user