This commit is contained in:
Ruidy Nemausat 2020-02-27 16:19:15 +01:00
parent 481832fdbc
commit 5fe28f5c38
3 changed files with 1 additions and 10 deletions

View file

@ -264,6 +264,7 @@ namespace TicketManager.Controllers
[ProducesResponseType(StatusCodes.Status404NotFound)]
[HttpPatch("{id}/members")]
public async Task<ActionResult<Project>> SetProjectMembers(int id, List<AppUser> projectMembers)
// [SAFETY] Use RequestDTO to limits posibilities.
{
Project project = await _context.Projects
.Include(p => p.Assignments)

View file

@ -1,17 +1,11 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using TicketManager.Models;
namespace TicketManager.DTO
{
public class NewAppUserDTO
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Presentation { get; set; }
[DataType(DataType.EmailAddress)]
@ -19,7 +13,6 @@ namespace TicketManager.DTO
[DataType(DataType.PhoneNumber)]
public string Phone { get; set; }
public string Picture { get; set; }
}
}

View file

@ -7,11 +7,8 @@ namespace TicketManager.DTO
{
[Required]
public string Title { get; set; }
public string Description { get; set; }
public DateTime EndingDate { get; set; }
public Guid ManagerId { get; set; }
}
}