26 lines
491 B
Dart
26 lines
491 B
Dart
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;
|
|
}
|
|
|
|
Future<Map<String, dynamic>> uploadChatAttachment(
|
|
Map<String, dynamic> data,
|
|
) async {
|
|
Response response = await request.post(
|
|
'/message/attachment',
|
|
data: data,
|
|
);
|
|
|
|
return response.data;
|
|
}
|