mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +00:00
-
This commit is contained in:
parent
481832fdbc
commit
5fe28f5c38
3 changed files with 1 additions and 10 deletions
|
|
@ -264,6 +264,7 @@ namespace TicketManager.Controllers
|
||||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
[HttpPatch("{id}/members")]
|
[HttpPatch("{id}/members")]
|
||||||
public async Task<ActionResult<Project>> SetProjectMembers(int id, List<AppUser> projectMembers)
|
public async Task<ActionResult<Project>> SetProjectMembers(int id, List<AppUser> projectMembers)
|
||||||
|
// [SAFETY] Use RequestDTO to limits posibilities.
|
||||||
{
|
{
|
||||||
Project project = await _context.Projects
|
Project project = await _context.Projects
|
||||||
.Include(p => p.Assignments)
|
.Include(p => p.Assignments)
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,11 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
|
||||||
using TicketManager.Models;
|
|
||||||
|
|
||||||
namespace TicketManager.DTO
|
namespace TicketManager.DTO
|
||||||
{
|
{
|
||||||
public class NewAppUserDTO
|
public class NewAppUserDTO
|
||||||
{
|
{
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
|
|
||||||
public string LastName { get; set; }
|
public string LastName { get; set; }
|
||||||
|
|
||||||
public string Presentation { get; set; }
|
public string Presentation { get; set; }
|
||||||
|
|
||||||
[DataType(DataType.EmailAddress)]
|
[DataType(DataType.EmailAddress)]
|
||||||
|
|
@ -19,7 +13,6 @@ namespace TicketManager.DTO
|
||||||
|
|
||||||
[DataType(DataType.PhoneNumber)]
|
[DataType(DataType.PhoneNumber)]
|
||||||
public string Phone { get; set; }
|
public string Phone { get; set; }
|
||||||
|
|
||||||
public string Picture { get; set; }
|
public string Picture { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,11 +7,8 @@ namespace TicketManager.DTO
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
public DateTime EndingDate { get; set; }
|
public DateTime EndingDate { get; set; }
|
||||||
|
|
||||||
public Guid ManagerId { get; set; }
|
public Guid ManagerId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue