Register notification services and add SMTP/Line config sections
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -160,6 +160,18 @@ builder.Services.AddScoped<ROLAC.API.Services.Disbursement.ICheckPrintService,
|
|||||||
ROLAC.API.Services.Disbursement.CheckPrintService>();
|
ROLAC.API.Services.Disbursement.CheckPrintService>();
|
||||||
builder.Services.AddScoped<IMealAttendanceService, MealAttendanceService>();
|
builder.Services.AddScoped<IMealAttendanceService, MealAttendanceService>();
|
||||||
|
|
||||||
|
// ── Notifications (email via SMTP + Line) ──────────────────────────────────
|
||||||
|
builder.Services.Configure<ROLAC.API.Services.Notifications.SmtpOptions>(config.GetSection("Smtp"));
|
||||||
|
builder.Services.Configure<ROLAC.API.Services.Notifications.LineOptions>(config.GetSection("Line"));
|
||||||
|
builder.Services.AddScoped<ROLAC.API.Services.Notifications.ISmtpDispatcher,
|
||||||
|
ROLAC.API.Services.Notifications.MailKitSmtpDispatcher>();
|
||||||
|
builder.Services.AddScoped<ROLAC.API.Services.Notifications.IEmailService,
|
||||||
|
ROLAC.API.Services.Notifications.EmailService>();
|
||||||
|
builder.Services.AddScoped<ROLAC.API.Services.Notifications.ILineNotificationService,
|
||||||
|
ROLAC.API.Services.Notifications.LineNotificationService>();
|
||||||
|
builder.Services.AddHttpClient<ROLAC.API.Services.Notifications.IMessageChannel,
|
||||||
|
ROLAC.API.Services.Notifications.LineMessageChannel>();
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Configurable role-based permissions (RBAC matrix)
|
// Configurable role-based permissions (RBAC matrix)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -28,5 +28,18 @@
|
|||||||
},
|
},
|
||||||
"Storage": {
|
"Storage": {
|
||||||
"LocalRoot": "App_Data/storage"
|
"LocalRoot": "App_Data/storage"
|
||||||
|
},
|
||||||
|
"Smtp": {
|
||||||
|
"Host": "",
|
||||||
|
"Port": 587,
|
||||||
|
"UseSsl": true,
|
||||||
|
"User": "",
|
||||||
|
"Password": "",
|
||||||
|
"FromAddress": "noreply@rolac.org",
|
||||||
|
"FromName": "River of Life Christian Church"
|
||||||
|
},
|
||||||
|
"Line": {
|
||||||
|
"ChannelAccessToken": "",
|
||||||
|
"ChannelSecret": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user