Address post is broken
This commit is contained in:
@@ -62,7 +62,7 @@ public class AddressController : Controller {
|
||||
id = _signInMan.Context.User.Identity.GetUserId();
|
||||
if (all is not null && all == true && roles.Contains("Administrateur"))
|
||||
return Ok(_context.Addresses.ToList());
|
||||
else return Ok(user.Adresses.ToList());
|
||||
else return Ok(_context.Users.Where(x=>x.Id == id).Include("Adresses").First().Adresses);
|
||||
} catch (Exception e) {
|
||||
_logger.LogError(10, e.Message);
|
||||
return BadRequest();
|
||||
|
||||
@@ -386,6 +386,7 @@ Pikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumbl
|
||||
LastName = "Admin",
|
||||
NormalizedUserName = "ADMIN",
|
||||
UserName = "Admin",
|
||||
PhoneNumber = "111-111-1111",
|
||||
Id = AdminID,
|
||||
NormalizedEmail = "ADMIN@ADMIN.COM",
|
||||
Email = "admin@admin.com"
|
||||
@@ -396,6 +397,7 @@ Pikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumbl
|
||||
LastName = "A.",
|
||||
NormalizedUserName = "PASLA",
|
||||
UserName = "PasLa",
|
||||
PhoneNumber="222-222-2222",
|
||||
Id = PaulID,
|
||||
NormalizedEmail = "PAUL@EXEMPLE.COM",
|
||||
Email = "paul@exemple.com"
|
||||
|
||||
Reference in New Issue
Block a user