2023-09-17 10:27:00 +08:00
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
|
|
|
|
import 'server.dart';
|
|
|
|
|
|
|
|
Future<Map<String, dynamic>> getUnreceivedMsg(String userId) async {
|
|
|
|
Response response = await request.get(
|
|
|
|
'/message/unreceived',
|
|
|
|
queryParameters: {
|
|
|
|
'receiver_id': userId,
|
|
|
|
},
|
|
|
|
);
|
|
|
|
|
|
|
|
return response.data;
|
|
|
|
}
|
2023-10-01 18:40:14 +08:00
|
|
|
|
|
|
|
Future<Map<String, dynamic>> uploadChatAttachment(
|
|
|
|
Map<String, dynamic> data,
|
|
|
|
) async {
|
|
|
|
Response response = await request.post(
|
|
|
|
'/message/attachment',
|
|
|
|
data: data,
|
|
|
|
);
|
|
|
|
|
|
|
|
return response.data;
|
|
|
|
}
|