#8 Added marker to indicate read status in talk chats
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:marianum_mobile/api/apiResponse.dart';
|
||||
|
||||
import '../../../model/accountData.dart';
|
||||
import '../../../model/endpointData.dart';
|
||||
@ -15,7 +16,7 @@ enum TalkApiMethod {
|
||||
delete,
|
||||
}
|
||||
|
||||
abstract class TalkApi<T> extends ApiRequest {
|
||||
abstract class TalkApi<T extends ApiResponse?> extends ApiRequest {
|
||||
String path;
|
||||
ApiParams? body;
|
||||
Map<String, String>? headers = {};
|
||||
@ -54,6 +55,7 @@ abstract class TalkApi<T> extends ApiRequest {
|
||||
T assembled;
|
||||
try {
|
||||
assembled = assemble(data.body);
|
||||
assembled?.headers = data.headers;
|
||||
return assembled;
|
||||
} catch (e) {
|
||||
// TODO report error
|
||||
|
Reference in New Issue
Block a user