✨ Activity debug include
This commit is contained in:
@ -25,7 +25,8 @@ public class ActivityController(
|
||||
public async Task<ActionResult<List<Activity>>> ListActivities(
|
||||
[FromQuery] string? cursor,
|
||||
[FromQuery] string? filter,
|
||||
[FromQuery] int take = 20
|
||||
[FromQuery] int take = 20,
|
||||
[FromQuery] string? debugInclude = null
|
||||
)
|
||||
{
|
||||
Instant? cursorTimestamp = null;
|
||||
@ -41,10 +42,11 @@ public class ActivityController(
|
||||
}
|
||||
}
|
||||
|
||||
var debugIncludeSet = debugInclude?.Split(',').ToHashSet() ?? new HashSet<string>();
|
||||
|
||||
HttpContext.Items.TryGetValue("CurrentUser", out var currentUserValue);
|
||||
return currentUserValue is not Account.Account currentUser
|
||||
? Ok(await acts.GetActivitiesForAnyone(take, cursorTimestamp))
|
||||
: Ok(await acts.GetActivities(take, cursorTimestamp, currentUser, filter));
|
||||
? Ok(await acts.GetActivitiesForAnyone(take, cursorTimestamp, debugIncludeSet))
|
||||
: Ok(await acts.GetActivities(take, cursorTimestamp, currentUser, filter, debugIncludeSet));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user