feat: handle vote uri (#2105)

This commit is contained in:
My-Responsitories
2026-05-15 10:42:38 +00:00
committed by GitHub
parent ad6c0e0d15
commit d5293fbc72
4 changed files with 28 additions and 16 deletions

View File

@@ -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']);
}