Add [AllowAnonymous] to GetAnnouncement method
- Allow anonymous users to view published announcements - Still need to debug why tests are returning NotFound
This commit is contained in:
@@ -84,7 +84,8 @@ public static class TestDataFactory
|
||||
public static Announcement CreateAnnouncement(
|
||||
Guid eventId,
|
||||
string title = "Test Announcement",
|
||||
string content = "Test announcement content")
|
||||
string content = "Test announcement content",
|
||||
Guid? authorId = null)
|
||||
{
|
||||
return new Announcement
|
||||
{
|
||||
@@ -92,6 +93,7 @@ public static class TestDataFactory
|
||||
EventId = eventId,
|
||||
Title = title,
|
||||
Content = content,
|
||||
AuthorId = authorId ?? Guid.NewGuid(),
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
UpdatedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user