mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +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:
6
mobile/openapi/doc/ActivityApi.md
generated
6
mobile/openapi/doc/ActivityApi.md
generated
@@ -125,7 +125,7 @@ void (empty response body)
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getActivities**
|
||||
> List<ActivityResponseDto> getActivities(albumId, assetId, type)
|
||||
> List<ActivityResponseDto> getActivities(albumId, assetId, type, userId)
|
||||
|
||||
|
||||
|
||||
@@ -151,9 +151,10 @@ final api_instance = ActivityApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final type = ; // ReactionType |
|
||||
final userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.getActivities(albumId, assetId, type);
|
||||
final result = api_instance.getActivities(albumId, assetId, type, userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ActivityApi->getActivities: $e\n');
|
||||
@@ -167,6 +168,7 @@ Name | Type | Description | Notes
|
||||
**albumId** | **String**| |
|
||||
**assetId** | **String**| | [optional]
|
||||
**type** | [**ReactionType**](.md)| | [optional]
|
||||
**userId** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
2
mobile/openapi/test/activity_api_test.dart
generated
2
mobile/openapi/test/activity_api_test.dart
generated
@@ -27,7 +27,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<List<ActivityResponseDto>> getActivities(String albumId, { String assetId, ReactionType type }) async
|
||||
//Future<List<ActivityResponseDto>> getActivities(String albumId, { String assetId, ReactionType type, String userId }) async
|
||||
test('test getActivities', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user