Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-15 12:24:39 +08:00
parent cb58822009
commit bdc524e486
29 changed files with 223 additions and 248 deletions

View File

@@ -152,7 +152,7 @@ abstract final class MsgHttp {
}
}
static Future uploadImage({
static Future<LoadingState<Map>> uploadImage({
required dynamic path,
required String bucket,
required String dir,
@@ -167,15 +167,9 @@ abstract final class MsgHttp {
}),
);
if (res.data['code'] == 0) {
return {
'status': true,
'data': res.data['data'],
};
return Success(res.data['data']);
} else {
return {
'status': false,
'msg': res.data['message'],
};
return Error(res.data['message']);
}
}