mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
fix parse dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -25,6 +25,7 @@ import 'package:PiliPlus/utils/accounts/account.dart';
|
||||
import 'package:PiliPlus/utils/app_sign.dart';
|
||||
import 'package:PiliPlus/utils/wbi_sign.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
|
||||
abstract final class LiveHttp {
|
||||
static Account get recommend => Accounts.get(AccountType.recommend);
|
||||
@@ -659,8 +660,11 @@ abstract final class LiveHttp {
|
||||
if (res.data['code'] == 0) {
|
||||
try {
|
||||
return Success(SuperChatData.fromJson(res.data['data']));
|
||||
} catch (e) {
|
||||
return Error(e.toString());
|
||||
} catch (e, s) {
|
||||
if (kDebugMode) {
|
||||
rethrow;
|
||||
}
|
||||
return Error('$e\n\n$s');
|
||||
}
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
|
||||
Reference in New Issue
Block a user