Removed todos and added User endpoint combined with register. Id changed to guid

This commit is contained in:
Dominic Villemure
2024-04-03 23:57:01 -04:00
parent df8b42bdf1
commit 1f795c53bb
67 changed files with 1750 additions and 1895 deletions

View File

@@ -73,27 +73,8 @@ public class ApplicationDbContextInitializer(
await userManager.CreateAsync(administrator, "Administrator1!");
if (!string.IsNullOrWhiteSpace(administratorRole.Name))
{
await userManager.AddToRolesAsync(administrator, new [] { administratorRole.Name });
await userManager.AddToRolesAsync(administrator, new[] { administratorRole.Name });
}
}
// Default data
// Seed, if necessary
if (!context.TodoLists.Any())
{
context.TodoLists.Add(new TodoList
{
Title = "Todo List",
Items =
{
new TodoItem { Title = "Make a todo list 📃" },
new TodoItem { Title = "Check off the first item ✅" },
new TodoItem { Title = "Realise you've already done two things on the list! 🤯"},
new TodoItem { Title = "Reward yourself with a nice, long nap 🏆" },
}
});
await context.SaveChangesAsync();
}
}
}