Class MyTicketsController
- Namespace
- FishMMO.ControlPanel.Controllers
- Assembly
- FishMMO-ControlPanel.dll
A player's own support tickets.
[ApiController]
[Route("api/support/tickets/mine")]
public sealed class MyTicketsController : ControllerBase
- Inheritance
-
MyTicketsController
- Inherited Members
Remarks
A separate controller from the staff one, on purpose. The difference between the
two views is whether internal staff notes are returned, and that is too important to be
an if inside a shared action. Here every read passes
includeInternal: false, and there is no parameter by which a caller could ask
otherwise.
Every action re-checks that the ticket belongs to the signed-in account, and answers 404, not 403, when it does not. A 403 would confirm that ticket 812 exists and belongs to somebody else, which is an enumeration oracle over other players' support history.
These are Self endpoints, so the audit filter deliberately ignores them: a player writing to their own ticket is not an operator action, and mixing the two populations would make the operator log unreadable.
Constructors
MyTicketsController(ISupportTicketService, ILogger<MyTicketsController>)
public MyTicketsController(ISupportTicketService tickets, ILogger<MyTicketsController> log)
Parameters
ticketsISupportTicketServicelogILogger<MyTicketsController>
Methods
File(FileRequest)
Files a ticket from the panel.
[HttpPost]
[Authorize(Policy = "Self")]
public Task<IActionResult> File(MyTicketsController.FileRequest request)
Parameters
requestMyTicketsController.FileRequest
Returns
Remarks
The game has /report, /bug and /helpme, which is where most
tickets come from. This exists for the player who cannot get in-game to file one —
the client will not start, or they are on a phone — and for following up in writing
at length, which a chat line is a poor place for.
It does not help a banned player. A banned account cannot authenticate here any more than it can in the game, so an appeal cannot be filed through this route. That is a real gap and it needs a channel outside the authenticated panel; it is not something this endpoint can quietly pretend to cover.
The reporter is the signed-in account, never a field in the body. Status, priority
and assignee are not accepted at all — see SupportTicketCreate.
Get(long)
One of the signed-in account's tickets, without internal notes.
[HttpGet("{id:long}")]
[Authorize(Policy = "Self")]
public Task<IActionResult> Get(long id)
Parameters
idlong
Returns
Mine(int, int)
The signed-in account's tickets.
[HttpGet]
[Authorize(Policy = "Self")]
public Task<IActionResult> Mine(int page = 1, int pageSize = 25)
Parameters
Returns
Reply(long, ReplyRequest)
Adds the player's reply.
[HttpPost("{id:long}/reply")]
[Authorize(Policy = "Self")]
public Task<IActionResult> Reply(long id, MyTicketsController.ReplyRequest request)
Parameters
idlongrequestMyTicketsController.ReplyRequest
Returns
Remarks
A reply to a resolved ticket reopens it, in the service. The player is telling staff it was not resolved, and the alternative is a message that lands where nobody looks.