1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-18 03:57:43 +02:00

fix(server,web): correctly show album level like (#4916)

* fix: like in global activity

* refactor: rename isGlobal to ReactionLevel.Album

* chore: open api

* chore: e2e test for album vs comment duplicate like checking

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
martin
2023-11-10 03:32:31 +01:00
committed by GitHub
parent 986bbfa831
commit 92ec1ce77f
21 changed files with 262 additions and 26 deletions

View File

@ -112,8 +112,10 @@ class ActivityApi {
///
/// * [ReactionType] type:
///
/// * [ReactionLevel] level:
///
/// * [String] userId:
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionType? type, String? userId, }) async {
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionType? type, ReactionLevel? level, String? userId, }) async {
// ignore: prefer_const_declarations
final path = r'/activity';
@ -131,6 +133,9 @@ class ActivityApi {
if (type != null) {
queryParams.addAll(_queryParams('', 'type', type));
}
if (level != null) {
queryParams.addAll(_queryParams('', 'level', level));
}
if (userId != null) {
queryParams.addAll(_queryParams('', 'userId', userId));
}
@ -157,9 +162,11 @@ class ActivityApi {
///
/// * [ReactionType] type:
///
/// * [ReactionLevel] level:
///
/// * [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, );
Future<List<ActivityResponseDto>?> getActivities(String albumId, { String? assetId, ReactionType? type, ReactionLevel? level, String? userId, }) async {
final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, type: type, level: level, userId: userId, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}