requestAcceptRejectApi function
Implementation
Future<String> requestAcceptRejectApi({required int userId, required String notificationId, bool confirmTap = true}) async {
appStore.setLoading(true);
Map req = {FriendKey.following: appStore.userId, FriendKey.followers: userId, FriendKey.notificationId: notificationId};
try {
var res = CommonModel.fromJson(await (handleResponse(await buildHttpResponse(confirmTap ? APIEndPoint.acceptFollowRequest : APIEndPoint.rejectFollowRequest, request: req, method: HttpMethod.POST))));
appStore.setLoading(false);
return res.message.validate();
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}