Class SupportTicketsController
- Namespace
- FishMMO.ControlPanel.Controllers
- Assembly
- FishMMO-ControlPanel.dll
The staff side of the support queue.
[ApiController]
[Route("api/support/tickets")]
public sealed class SupportTicketsController : ControllerBase
- Inheritance
-
SupportTicketsController
- Inherited Members
Remarks
Game master and above. The player's own view of the same tickets lives in MyTicketsController, as a separate controller rather than a branch inside these actions — because the difference between them is whether internal staff notes are returned, and a single action deciding that from a claim is one refactor away from getting it wrong.
Every write here is recorded by AuditActionFilter. Nothing in this file calls an audit method.
Constructors
SupportTicketsController(ISupportTicketService, IAccountService, AuditScope, ILogger<SupportTicketsController>)
public SupportTicketsController(ISupportTicketService tickets, IAccountService accounts, AuditScope audit, ILogger<SupportTicketsController> log)
Parameters
ticketsISupportTicketServiceaccountsIAccountServiceauditAuditScopelogILogger<SupportTicketsController>
Methods
Assign(long, AssignRequest)
Takes a ticket, or hands it back.
[HttpPost("{id:long}/assign")]
[Authorize(Policy = "Support")]
[Audited("ticket.assign", TargetType = "ticket", TargetRouteValue = "id")]
public Task<IActionResult> Assign(long id, SupportTicketsController.AssignRequest request)
Parameters
idlongrequestSupportTicketsController.AssignRequest
Returns
Get(long)
One ticket, with the whole conversation including internal notes.
[HttpGet("{id:long}")]
[Authorize(Policy = "Support")]
public Task<IActionResult> Get(long id)
Parameters
idlong
Returns
Reply(long, ReplyRequest)
Replies to the player, or writes a note only staff can see.
[HttpPost("{id:long}/reply")]
[Authorize(Policy = "Support")]
[Audited("ticket.reply", TargetType = "ticket", TargetRouteValue = "id")]
public Task<IActionResult> Reply(long id, SupportTicketsController.ReplyRequest request)
Parameters
idlongrequestSupportTicketsController.ReplyRequest
Returns
Search(int[], int?, string, bool, string, string, string, int, int, int?)
The queue.
[HttpGet]
[Authorize(Policy = "Support")]
public Task<IActionResult> Search(int[] status, int? category, string assignedTo, bool unassigned = false, string reporter = null, string target = null, string subject = null, int page = 1, int pageSize = 25, int? tier = null)
Parameters
statusint[]categoryint?assignedTostringunassignedboolreporterstringtargetstringsubjectstringpageintpageSizeinttierint?
Returns
SetPriority(long, PriorityRequest)
Sets the staff priority.
[HttpPost("{id:long}/priority")]
[Authorize(Policy = "Support")]
[Audited("ticket.priority", TargetType = "ticket", TargetRouteValue = "id")]
public Task<IActionResult> SetPriority(long id, SupportTicketsController.PriorityRequest request)
Parameters
idlongrequestSupportTicketsController.PriorityRequest
Returns
SetStatus(long, StatusRequest)
Moves a ticket's status, and records what was decided when finishing it.
[HttpPost("{id:long}/status")]
[Authorize(Policy = "Support")]
[Audited("ticket.status", TargetType = "ticket", TargetRouteValue = "id")]
public Task<IActionResult> SetStatus(long id, SupportTicketsController.StatusRequest request)
Parameters
idlongrequestSupportTicketsController.StatusRequest
Returns
SetTier(long, TierRequest)
Moves a ticket to another support tier: promotes it to the administrators, or hands it back.
[HttpPost("{id:long}/tier")]
[Authorize(Policy = "Support")]
[Audited("ticket.tier", TargetType = "ticket", TargetRouteValue = "id")]
public Task<IActionResult> SetTier(long id, SupportTicketsController.TierRequest request)
Parameters
idlongrequestSupportTicketsController.TierRequest
Returns
Remarks
Tiers are access levels — GameMaster (2) and Admin (3). The service clears the
assignee and writes the reason onto the ticket as a staff note in one transaction. A game
master may promote; only an administrator may hand a ticket back down, because only they
can act on it once it is there.