postAcceptSharedDevice method
Implementation
@override
Future<bool> postAcceptSharedDevice(String deviceId, String vcode) async {
try {
final String body = json.encode({'device_id': deviceId, 'vcode': vcode});
return await dio
.post('${ApiEndpoints.SHARE}/2', data: body)
.then((value) => true);
} on Exception catch (e) {
throw HttpHelper.decodeErrorResponse(e,
tag: TAG,
logger: logger,
defaultErrorMessage: 'Failed to accept this shared device',
meta: {
'device': deviceId,
'vcode': vcode,
'method': 'postAcceptSharedDevice'
});
}
}