From 44958b5c18d9c88e55a745a5a9d652eace24c208 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 18 Sep 2023 20:47:39 -0400 Subject: [PATCH] Added new class Added template endpoint to upload contact files. These are just plain text files of phone numbers separated by a new line --- Controllers/ContactQueueCreationController.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Controllers/ContactQueueCreationController.cs diff --git a/Controllers/ContactQueueCreationController.cs b/Controllers/ContactQueueCreationController.cs new file mode 100644 index 0000000..0cfe19a --- /dev/null +++ b/Controllers/ContactQueueCreationController.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Mvc; + +namespace TextSender_API.Controllers; + +[ApiController] +[Route("api/v1/contact/queue")] +public class ContactQueueCreationController : ControllerBase +{ + #region Fields + private readonly ILogger _logger; + #endregion + + + #region Constructors + + public ContactQueueCreationController(ILogger logger) + { + this._logger = logger; + } + #endregion + + #region Methods + [HttpPost("upload"), DisableRequestSizeLimit] + public IActionResult Upload([FromForm(Name = "file")] List contactFile, + [FromForm(Name = "user_id")] string userID) + { + return Ok(); + } + #endregion +} \ No newline at end of file