39 lines
995 B
Dart
39 lines
995 B
Dart
import '../api_client.dart';
|
|
import '../proxy_client.dart';
|
|
|
|
/// 举报/反馈相关 API
|
|
abstract final class FeedbackApi {
|
|
static final _client = ApiClient.instance.proxy;
|
|
|
|
/// 获取反馈图片上传预签名 URL
|
|
/// body: layer (fileName)
|
|
/// 返回 data: shed (uploadUrl), hunt (filePath)
|
|
static Future<ApiResponse> getUploadPresignedUrl({
|
|
required String fileName,
|
|
}) async {
|
|
return _client.request(
|
|
path: '/v1/feedback/upload-presigned-url',
|
|
method: 'POST',
|
|
body: {'layer': fileName},
|
|
);
|
|
}
|
|
|
|
/// 提交反馈
|
|
/// body: inventory (fileUrls), cloak (content), pauldron (contentType)
|
|
static Future<ApiResponse> submit({
|
|
required List<String> fileUrls,
|
|
required String content,
|
|
required String contentType,
|
|
}) async {
|
|
return _client.request(
|
|
path: '/v1/feedback/submit',
|
|
method: 'POST',
|
|
body: {
|
|
'inventory': fileUrls,
|
|
'cloak': content,
|
|
'pauldron': contentType,
|
|
},
|
|
);
|
|
}
|
|
}
|