mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
21 lines
567 B
Go
21 lines
567 B
Go
|
package handlers
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/api/authz"
|
||
|
"github.com/zitadel/zitadel/internal/domain"
|
||
|
"github.com/zitadel/zitadel/internal/notification/channels/log"
|
||
|
)
|
||
|
|
||
|
// GetLogProvider reads the iam log provider config
|
||
|
func (n *NotificationQueries) GetLogProvider(ctx context.Context) (*log.Config, error) {
|
||
|
config, err := n.NotificationProviderByIDAndType(ctx, authz.GetInstance(ctx).InstanceID(), domain.NotificationProviderTypeLog)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &log.Config{
|
||
|
Compact: config.Compact,
|
||
|
}, nil
|
||
|
}
|