mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-16 14:14:01 +08:00
feat: handle vote uri (#2105)
This commit is contained in:
committed by
GitHub
parent
ad6c0e0d15
commit
d5293fbc72
@@ -375,7 +375,10 @@ abstract final class DynamicsHttp {
|
||||
queryParameters: {'vote_id': voteId},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(VoteInfo.fromSeparatedJson(res.data['data']));
|
||||
final voteInfo = VoteInfo.fromSeparatedJson(res.data['data']);
|
||||
return voteInfo.voteId == null
|
||||
? const Error('无效的投票id')
|
||||
: Success(voteInfo);
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user