mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 00:36:39 +00:00
Merge branch 'backend' of https://github.com/rjNemo/ticket_manager
Pull last backend version
This commit is contained in:
commit
70725684b3
9 changed files with 20 additions and 9 deletions
|
|
@ -202,7 +202,7 @@ namespace TicketManager.Controllers
|
|||
}
|
||||
|
||||
[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
|
||||
.Include(u => u.Assignments)
|
||||
|
|
@ -214,7 +214,7 @@ namespace TicketManager.Controllers
|
|||
{
|
||||
return BadRequest();
|
||||
}
|
||||
return user.GetProjects().Select(p => new ProjectDTORequest(p)).ToList();
|
||||
return user.GetProjects().Select(p => new ProjectDTORead(p)).ToList();
|
||||
}
|
||||
|
||||
[HttpGet("{id}/tickets/")]
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ namespace TicketManager
|
|||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
// .ConfigureLogging((context, logging) =>
|
||||
// {
|
||||
// logging.ClearProviders();
|
||||
// logging.AddConfiguration(context.Configuration.GetSection("Logging"));
|
||||
// logging.AddDebug();
|
||||
// logging.AddConsole();
|
||||
// });
|
||||
}
|
||||
#pragma warning restore CS1591
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace TicketManager.Resources
|
|||
CreationDate = user.CreationDate;
|
||||
Picture = user.Picture;
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ namespace TicketManager.Resources
|
|||
|
||||
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>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ using TicketManager.Models;
|
|||
|
||||
namespace TicketManager.Resources
|
||||
{
|
||||
public class ProjectDTORequest
|
||||
public class ProjectDTORead
|
||||
{
|
||||
public ProjectDTORequest(Project project)
|
||||
public ProjectDTORead(Project project)
|
||||
{
|
||||
Id = project.Id;
|
||||
Title = project.Title;
|
||||
|
|
@ -20,7 +20,7 @@ namespace TicketManager.Resources
|
|||
Difficulty = ticket.Difficulty.ToString();
|
||||
Category = ticket.Category.ToString();
|
||||
CreatorId = ticket.CreatorId;
|
||||
Project = ticket.Project != null ? new ProjectDTORequest(ticket.Project) : null;
|
||||
Project = ticket.Project != null ? new ProjectDTORead(ticket.Project) : null;
|
||||
Notes = ticket.Notes;
|
||||
Activities = ticket.Activities;
|
||||
Files = ticket.Files;
|
||||
|
|
@ -49,7 +49,7 @@ namespace TicketManager.Resources
|
|||
|
||||
public Guid CreatorId { get; set; }
|
||||
|
||||
public ProjectDTORequest Project { get; set; }
|
||||
public ProjectDTORead Project { get; set; }
|
||||
|
||||
public List<Note> Notes { get; set; } = new List<Note>();
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ namespace TicketManager.Tests
|
|||
await context.SaveChangesAsync();
|
||||
|
||||
// result = await controller.PatchProject(1,
|
||||
// new ProjectDTORequest()
|
||||
// new ProjectDTORead()
|
||||
// {
|
||||
// Id = 1,
|
||||
// Title = "Top Secret Project",
|
||||
|
|
|
|||
4
client/src/authentication/config.json
Normal file
4
client/src/authentication/config.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"domain": "dev-fyjrvohx.auth0.com",
|
||||
"clientId": "NOTxfOhjCLkdvsstLm2tcS1kiAjCdWm9"
|
||||
}
|
||||
Loading…
Reference in a new issue