together_mobile/lib/request/message.dart

26 lines
491 B
Dart
Raw Normal View History

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;
}