1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-18 03:57:43 +02: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:
Jason Rasmussen
2023-11-01 11:49:12 -04:00
committed by GitHub
parent cf4ec06750
commit 0130591a0f
10 changed files with 89 additions and 17 deletions

View File

@ -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));
}