mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: show/set activity like per user (#4775)
* fix: like per user * chore: open api * chore: e2e test for userId filtering
This commit is contained in:
parent
cf4ec06750
commit
0130591a0f
10 changed files with 89 additions and 17 deletions
13
mobile/openapi/lib/api/activity_api.dart
generated
13
mobile/openapi/lib/api/activity_api.dart
generated
|
|
@ -111,7 +111,9 @@ class ActivityApi {
|
|||
/// * [String] assetId:
|
||||
///
|
||||
/// * [ReactionType] type:
|
||||
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionType? type, }) async {
|
||||
///
|
||||
/// * [String] userId:
|
||||
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionType? type, String? userId, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/activity';
|
||||
|
||||
|
|
@ -129,6 +131,9 @@ class ActivityApi {
|
|||
if (type != null) {
|
||||
queryParams.addAll(_queryParams('', 'type', type));
|
||||
}
|
||||
if (userId != null) {
|
||||
queryParams.addAll(_queryParams('', 'userId', userId));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
|
@ -151,8 +156,10 @@ class ActivityApi {
|
|||
/// * [String] assetId:
|
||||
///
|
||||
/// * [ReactionType] type:
|
||||
Future<List<ActivityResponseDto>?> getActivities(String albumId, { String? assetId, ReactionType? type, }) async {
|
||||
final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, type: type, );
|
||||
///
|
||||
/// * [String] userId:
|
||||
Future<List<ActivityResponseDto>?> getActivities(String albumId, { String? assetId, ReactionType? type, String? userId, }) async {
|
||||
final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, type: type, userId: userId, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue