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:
Denis Urs Rudolph
2026-04-06 21:00:00 +02:00
parent f4e2c28869
commit 0dc30f29c5
2 changed files with 4 additions and 1 deletions
@@ -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
};