mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 05:32:26 +08:00
wip: history request groups
This commit is contained in:
@ -240,12 +240,28 @@ class CollectionStateNotifier
|
||||
httpResponseModel: responseModel,
|
||||
isWorking: false,
|
||||
);
|
||||
String newHistoryId = getNewUuid();
|
||||
HistoryRequestModel model = HistoryRequestModel(
|
||||
historyId: newHistoryId,
|
||||
metaData: HistoryMetaModel(
|
||||
historyId: newHistoryId,
|
||||
name: requestModel.name,
|
||||
url: substitutedHttpRequestModel.url,
|
||||
method: substitutedHttpRequestModel.method,
|
||||
responseStatus: statusCode,
|
||||
timeStamp: DateTime.now(),
|
||||
),
|
||||
httpRequestModel: substitutedHttpRequestModel,
|
||||
httpResponseModel: responseModel,
|
||||
);
|
||||
ref.read(historyMetaStateNotifier.notifier).addHistoryRequest(model);
|
||||
}
|
||||
|
||||
// update state with response data
|
||||
map = {...state!};
|
||||
map[id] = newRequestModel;
|
||||
state = map;
|
||||
|
||||
ref.read(hasUnsavedChangesProvider.notifier).state = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user