test
This commit is contained in:
parent
ab593a45b9
commit
692a672bbf
@ -104,10 +104,10 @@ class APIService<T extends SerializerDeserializer> {
|
||||
Future<APIResponse<T>> _main(String url, dynamic body, String method, String succeed, bool force,
|
||||
BuildContext? context, Options? options) async {
|
||||
var err = "";
|
||||
try {
|
||||
try {
|
||||
_dio.options.headers["Authorization"] = "Bearer ${localStorage.getItem('accessToken') ?? ""}";
|
||||
_dio.interceptors.clear();
|
||||
print("${_dio.options.baseUrl}$url" );
|
||||
print("URL ${_dio.options.baseUrl}$url" );
|
||||
var response = await _request(url, method, body, options);
|
||||
if (response.statusCode != null && response.statusCode! < 400) {
|
||||
if (method == "delete") { cache.remove(url); return APIResponse<T>(); }
|
||||
@ -137,7 +137,7 @@ class APIService<T extends SerializerDeserializer> {
|
||||
alertBannerLocation: AlertBannerLocation.bottom,);
|
||||
} catch (e) { /* */ }
|
||||
}
|
||||
throw Exception(err);
|
||||
throw Exception("${_dio.options.baseUrl}$url $err");
|
||||
}
|
||||
|
||||
Future<APIResponse<RawData>> raw(
|
||||
|
@ -48,7 +48,10 @@ class StorageItem extends AbstractItem<StoragePricing, StoragePartnership, Stora
|
||||
}
|
||||
|
||||
@override Map<String, dynamic> serialize() {
|
||||
var obj = infos();
|
||||
var obj = {
|
||||
"acronym": acronym,
|
||||
"storage_type": typeEnum,
|
||||
};
|
||||
obj.addAll(toJSON());
|
||||
return obj;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ class SchedulerFormsWidgetState extends State<SchedulerFormsWidget> {
|
||||
} catch (e) { /* */ }
|
||||
|
||||
}
|
||||
});
|
||||
}).catchError((e) {});
|
||||
} else {
|
||||
Future.delayed(const Duration(milliseconds: 100), () {
|
||||
widget.shouldSearch = true;
|
||||
|
@ -374,10 +374,10 @@ class FlowChartState<T extends FlowData> extends State<FlowChart> {
|
||||
if (event.logicalKey == LogicalKeyboardKey.controlLeft && event is KeyUpEvent) {
|
||||
isCtrl = false;
|
||||
}
|
||||
if ((event is KeyDownEvent || event.logicalKey == LogicalKeyboardKey.keyZ) && isCtrl) {
|
||||
if ((event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.keyZ) && isCtrl) {
|
||||
widget.dashboard.back();
|
||||
}
|
||||
if ((event is KeyDownEvent || event.logicalKey == LogicalKeyboardKey.keyY) && isCtrl) {
|
||||
if ((event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.keyY) && isCtrl) {
|
||||
widget.dashboard.forward();
|
||||
}
|
||||
if (event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.add) {
|
||||
|
Loading…
Reference in New Issue
Block a user