mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-01-16 17:58:22 -05:00
29 lines
645 B
C#
29 lines
645 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace Common.Configuration.Notification;
|
|
|
|
public sealed record NotifiarrConfig : BaseNotificationConfig
|
|
{
|
|
public const string SectionName = "Notifiarr";
|
|
|
|
[ConfigurationKeyName("API_KEY")]
|
|
public string? ApiKey { get; init; }
|
|
|
|
[ConfigurationKeyName("CHANNEL_ID")]
|
|
public string? ChannelId { get; init; }
|
|
|
|
public override bool IsValid()
|
|
{
|
|
if (string.IsNullOrEmpty(ApiKey?.Trim()))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(ChannelId?.Trim()))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
} |