mirror of
https://github.com/foss42/apidash.git
synced 2025-05-26 02:36:31 +08:00
wip: history panes
This commit is contained in:
@ -1,10 +1,22 @@
|
||||
import 'package:apidash/models/models.dart';
|
||||
import 'package:apidash/utils/convert_utils.dart';
|
||||
import 'package:apidash/models/models.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
|
||||
DateTime stripTime(DateTime dateTime) {
|
||||
return DateTime(dateTime.year, dateTime.month, dateTime.day);
|
||||
}
|
||||
|
||||
RequestModel getRequestModelFromHistoryModel(HistoryRequestModel model) {
|
||||
return RequestModel(
|
||||
id: model.historyId,
|
||||
name: model.metaData.name,
|
||||
responseStatus: model.httpResponseModel.statusCode,
|
||||
message: kResponseCodeReasons[model.httpResponseModel.statusCode],
|
||||
httpRequestModel: model.httpRequestModel,
|
||||
httpResponseModel: model.httpResponseModel,
|
||||
);
|
||||
}
|
||||
|
||||
String getHistoryRequestName(HistoryMetaModel model) {
|
||||
if (model.name.isNotEmpty) {
|
||||
return model.name;
|
||||
|
Reference in New Issue
Block a user