Class PlatformQueuesController
- Namespace
- FishMMO.ControlPanel.Controllers
- Assembly
- FishMMO-ControlPanel.dll
The queues players wait in: outbound email, outbound SMS, and the group finder.
[ApiController]
[Route("api/platform/queues")]
public sealed class PlatformQueuesController : ControllerBase
- Inheritance
-
PlatformQueuesController
- Inherited Members
Remarks
The SMS endpoints are the email endpoints' twins in every respect below — the silent outage, the age as the alarm, no purge, retry as the only write — with one addition: the phone number is personal data and leaves this controller masked.
Constructors
PlatformQueuesController(IQueueBoardService, AuditScope, ILogger<PlatformQueuesController>)
public PlatformQueuesController(IQueueBoardService queues, AuditScope audit, ILogger<PlatformQueuesController> log)
Parameters
queuesIQueueBoardServiceauditAuditScopelogILogger<PlatformQueuesController>
Methods
EmailQueue(string, string, int, int)
One page of the outbound email queue, with the counts and the ages.
[HttpGet("email")]
[Authorize(Policy = "Operator")]
public Task<IActionResult> EmailQueue(string state, string search, int page = 1, int pageSize = 25)
Parameters
statestringOne of
pending,claimed,failed,sent. Omit for any.searchstringSubstring of the recipient address or account name. Omit for all.
pageint1-based page number.
pageSizeintRows per page. Clamped by the service to 200.
Returns
GroupFinderQueue(int?, int, int)
One page of the group finder queue.
[HttpGet("group-finder")]
[Authorize(Policy = "Operator")]
public Task<IActionResult> GroupFinderQueue(int? status, int page = 1, int pageSize = 25)
Parameters
statusint?0 waiting, 1 matched. Omit for any.
pageint1-based page number.
pageSizeintRows per page. Clamped by the service to 200.
Returns
RetryEmail(long, ReasonRequest)
Releases the claim on a stuck message so a login server can pick it up again.
[HttpPost("email/{id:long}/retry")]
[Authorize(Policy = "Operator.StepUp")]
[Audited("platform.email-retry", TargetType = "email", TargetRouteValue = "id")]
public Task<IActionResult> RetryEmail(long id, PlatformQueuesController.ReasonRequest request)
Parameters
idlongrequestPlatformQueuesController.ReasonRequest
Returns
Remarks
This does not send anything. Delivery belongs to the login server; all this does is make the row eligible to be claimed again, which is why the acknowledgement says the message was re-queued rather than sent. If nothing is claiming — the case this page exists to reveal — the retry will appear to do nothing, and the honest thing is to say so rather than let a green toast imply mail went out.
Step-up, not plain Operator, because it touches the account verification path: a borrowed unlocked session should not be able to re-queue a verification email for an account somebody is trying to take over. The reason is mandatory for the same reason it is on every other write in this panel — the audit row is only as useful as what it says about why.
RetrySms(long, ReasonRequest)
Releases the claim on a stuck text message so the SMS drain can pick it up again.
[HttpPost("sms/{id:long}/retry")]
[Authorize(Policy = "Operator.StepUp")]
[Audited("platform.sms-retry", TargetType = "sms", TargetRouteValue = "id")]
public Task<IActionResult> RetrySms(long id, PlatformQueuesController.ReasonRequest request)
Parameters
idlongrequestPlatformQueuesController.ReasonRequest
Returns
Remarks
The email retry's twin: it sends nothing, it keeps attempts and
last_error, and it is step-up with a mandatory reason because it touches the
verification path. A row reading as failed is one the drain gave up on after its
attempt limit, so a release grants exactly one more attempt.
The audit row names the account and nothing else personal. Neither the phone number nor the message body is put in Details or the log line; the service does not even return the number.
SmsQueue(string, string, int, int)
One page of the outbound SMS queue, with the counts and the ages.
[HttpGet("sms")]
[Authorize(Policy = "Operator")]
public Task<IActionResult> SmsQueue(string state, string search, int page = 1, int pageSize = 25)
Parameters
statestringOne of
pending,claimed,failed,sent. Omit for any.searchstringAccount-name substring, or a whole phone number. Omit for all.
pageint1-based page number.
pageSizeintRows per page. Clamped by the service to 200.
Returns
Remarks
The email read's twin. A player who chose verify-by-SMS finishes registering through this table, and the same thresholds apply: the drain is the email drain's twin and polls on the same kind of interval.
The phone number never leaves this method whole. It is personal data and the page has no use for the full number, so it is masked here, to the last four digits, rather than sent and hidden by the browser. The body is not read at all.