Removed todos and added User endpoint combined with register. Id changed to guid
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user