Saving changes
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using TextSender_API.Models;
|
||||
|
||||
namespace TextSender_API.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/v1/user")]
|
||||
public class RegisterController : ControllerBase
|
||||
{
|
||||
#region Fields
|
||||
private readonly ILogger<RegisterController> _logger;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
|
||||
public RegisterController(ILogger<RegisterController> logger)
|
||||
{
|
||||
this._logger = logger;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
[HttpPost("register"), DisableRequestSizeLimit]
|
||||
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> contactFile,
|
||||
[FromForm(Name = "user_id")] string userID)
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
+18
-7
@@ -1,16 +1,27 @@
|
||||
using System;
|
||||
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace TextSender_API.Models;
|
||||
|
||||
public class User
|
||||
{
|
||||
#region Properties
|
||||
public int UserID { get; set; }
|
||||
public string Firstname { get; set; }
|
||||
public string Lastname { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public DateTime DateCreated { get; set; }
|
||||
[BsonElement("_id")]
|
||||
public ObjectId UserID { get; set; }
|
||||
[BsonElement("firstname")]
|
||||
public string? Firstname { get; set; }
|
||||
[BsonElement("lastname")]
|
||||
public string? Lastname { get; set; }
|
||||
[BsonElement("phonenumber")]
|
||||
public string? PhoneNumber { get; set; }
|
||||
[BsonElement("username")]
|
||||
public string? Username { get; set; }
|
||||
[BsonElement("password")]
|
||||
public string? Password { get; set; }
|
||||
[BsonElement("datecreated")]
|
||||
public DateTime? DateCreated { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace TextSender_API.Repositories;
|
||||
|
||||
|
||||
public class UserRepository
|
||||
{
|
||||
#region Properties
|
||||
#endregion
|
||||
|
||||
|
||||
#region Constructors
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user