(),
Addresses: new[] { to },
Subject: "ROLAC test email / 測試郵件",
HtmlBody: "This is a test email from ROLAC notification settings.
"
+ "這是來自 ROLAC 通知設定的測試郵件。
",
SentByUserId: _currentUser.UserIdOrSystem), ct);
return Ok(result);
}
[HttpPost("notification/test-line")]
[HasPermission(Modules.Settings, PermissionActions.Write)]
public async Task TestLine([FromBody] TestLineRequest request, CancellationToken ct)
{
if (request.MemberId is null && request.GroupId is null)
return BadRequest(new { message = "Choose a bound member or group to receive the test." });
var result = await _line.SendLineAsync(
body: "ROLAC 測試訊息 / This is a test Line message from ROLAC.",
memberIds: request.MemberId is { } m ? new[] { m } : Array.Empty(),
groupIds: request.GroupId is { } g ? new[] { g } : Array.Empty(),
sentByUserId: _currentUser.UserIdOrSystem,
ct);
return Ok(result);
}
}