mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 10:49:49 +08:00
refactor: move authModel to HttpRequestModel
This commit is contained in:
@@ -18,6 +18,9 @@ _$HttpRequestModelImpl _$$HttpRequestModelImplFromJson(
|
||||
params: (json['params'] as List<dynamic>?)
|
||||
?.map((e) => NameValueModel.fromJson(Map<String, Object?>.from(e as Map)))
|
||||
.toList(),
|
||||
authModel: json['authModel'] == null
|
||||
? const AuthModel(type: APIAuthType.none)
|
||||
: AuthModel.fromJson(Map<String, dynamic>.from(json['authModel'] as Map)),
|
||||
isHeaderEnabledList: (json['isHeaderEnabledList'] as List<dynamic>?)
|
||||
?.map((e) => e as bool)
|
||||
.toList(),
|
||||
@@ -41,6 +44,7 @@ Map<String, dynamic> _$$HttpRequestModelImplToJson(
|
||||
'url': instance.url,
|
||||
'headers': instance.headers?.map((e) => e.toJson()).toList(),
|
||||
'params': instance.params?.map((e) => e.toJson()).toList(),
|
||||
'authModel': instance.authModel?.toJson(),
|
||||
'isHeaderEnabledList': instance.isHeaderEnabledList,
|
||||
'isParamEnabledList': instance.isParamEnabledList,
|
||||
'bodyContentType': _$ContentTypeEnumMap[instance.bodyContentType]!,
|
||||
|
||||
Reference in New Issue
Block a user