Fixed 403 Forbidden thrown when getting Website metadata

- Add User-Agent to header to prevent 403 Forbidden when downloading webpage strings
- Add Bookmark URL and User Id unique combo constraint
- Add Tag Name and User Id unique combo constraint
This commit is contained in:
2023-03-04 00:37:59 -06:00
parent e9d6c2ef88
commit 34d459cc58
5 changed files with 271 additions and 5 deletions

View File

@ -39,7 +39,11 @@ namespace YABA.Data.Context
.IsUnique();
modelBuilder.Entity<Tag>()
.HasIndex(x => x.Name)
.HasIndex(x => new { x.Name, x.UserId })
.IsUnique();
modelBuilder.Entity<Bookmark>()
.HasIndex(x => new { x.Url, x.UserId })
.IsUnique();
}