Pull last backend version
This commit is contained in:
Ruidy Nemausat 2020-04-18 14:58:08 +02:00
commit 70725684b3
9 changed files with 20 additions and 9 deletions

View file

@ -202,7 +202,7 @@ namespace TicketManager.Controllers
} }
[HttpGet("{id}/projects")] [HttpGet("{id}/projects")]
public async Task<ActionResult<IEnumerable<ProjectDTORequest>>> GetAppUserProjects(Guid id) public async Task<ActionResult<IEnumerable<ProjectDTORead>>> GetAppUserProjects(Guid id)
{ {
var user = await _context.AppUsers var user = await _context.AppUsers
.Include(u => u.Assignments) .Include(u => u.Assignments)
@ -214,7 +214,7 @@ namespace TicketManager.Controllers
{ {
return BadRequest(); return BadRequest();
} }
return user.GetProjects().Select(p => new ProjectDTORequest(p)).ToList(); return user.GetProjects().Select(p => new ProjectDTORead(p)).ToList();
} }
[HttpGet("{id}/tickets/")] [HttpGet("{id}/tickets/")]

View file

@ -19,6 +19,13 @@ namespace TicketManager
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}); });
// .ConfigureLogging((context, logging) =>
// {
// logging.ClearProviders();
// logging.AddConfiguration(context.Configuration.GetSection("Logging"));
// logging.AddDebug();
// logging.AddConsole();
// });
} }
#pragma warning restore CS1591 #pragma warning restore CS1591
} }

View file

@ -19,7 +19,7 @@ namespace TicketManager.Resources
CreationDate = user.CreationDate; CreationDate = user.CreationDate;
Picture = user.Picture; Picture = user.Picture;
Activities = user.Activities; Activities = user.Activities;
Projects = user.GetProjects().Select(u => new ProjectDTORequest(u)).ToList(); Projects = user.GetProjects().Select(u => new ProjectDTORead(u)).ToList();
Tickets = user.GetTickets().Select(u => new TicketDTORead(u)).ToList(); Tickets = user.GetTickets().Select(u => new TicketDTORead(u)).ToList();
} }
@ -46,7 +46,7 @@ namespace TicketManager.Resources
public List<Activity> Activities { get; set; } = new List<Activity>(); public List<Activity> Activities { get; set; } = new List<Activity>();
public List<ProjectDTORequest> Projects { get; set; } = new List<ProjectDTORequest>(); public List<ProjectDTORead> Projects { get; set; } = new List<ProjectDTORead>();
public List<TicketDTORead> Tickets { get; set; } = new List<TicketDTORead>(); public List<TicketDTORead> Tickets { get; set; } = new List<TicketDTORead>();
} }

View file

@ -5,9 +5,9 @@ using TicketManager.Models;
namespace TicketManager.Resources namespace TicketManager.Resources
{ {
public class ProjectDTORequest public class ProjectDTORead
{ {
public ProjectDTORequest(Project project) public ProjectDTORead(Project project)
{ {
Id = project.Id; Id = project.Id;
Title = project.Title; Title = project.Title;

View file

@ -20,7 +20,7 @@ namespace TicketManager.Resources
Difficulty = ticket.Difficulty.ToString(); Difficulty = ticket.Difficulty.ToString();
Category = ticket.Category.ToString(); Category = ticket.Category.ToString();
CreatorId = ticket.CreatorId; CreatorId = ticket.CreatorId;
Project = ticket.Project != null ? new ProjectDTORequest(ticket.Project) : null; Project = ticket.Project != null ? new ProjectDTORead(ticket.Project) : null;
Notes = ticket.Notes; Notes = ticket.Notes;
Activities = ticket.Activities; Activities = ticket.Activities;
Files = ticket.Files; Files = ticket.Files;
@ -49,7 +49,7 @@ namespace TicketManager.Resources
public Guid CreatorId { get; set; } public Guid CreatorId { get; set; }
public ProjectDTORequest Project { get; set; } public ProjectDTORead Project { get; set; }
public List<Note> Notes { get; set; } = new List<Note>(); public List<Note> Notes { get; set; } = new List<Note>();

View file

@ -158,7 +158,7 @@ namespace TicketManager.Tests
await context.SaveChangesAsync(); await context.SaveChangesAsync();
// result = await controller.PatchProject(1, // result = await controller.PatchProject(1,
// new ProjectDTORequest() // new ProjectDTORead()
// { // {
// Id = 1, // Id = 1,
// Title = "Top Secret Project", // Title = "Top Secret Project",

View file

@ -0,0 +1,4 @@
{
"domain": "dev-fyjrvohx.auth0.com",
"clientId": "NOTxfOhjCLkdvsstLm2tcS1kiAjCdWm9"
}