mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
fix bug
This commit is contained in:
@@ -103,6 +103,7 @@ class Api {
|
||||
|
||||
if (id != null) {
|
||||
data["_id"] = id;
|
||||
data["id"] = id;
|
||||
return await Http.put<NullResponse>(
|
||||
Url.addTask,
|
||||
data,
|
||||
@@ -207,6 +208,7 @@ class Api {
|
||||
|
||||
if (id != null) {
|
||||
data["_id"] = id;
|
||||
data["id"] = id;
|
||||
return await Http.put<NullResponse>(
|
||||
Url.addEnv,
|
||||
data,
|
||||
|
||||
11
lib/module/env/env_bean.dart
vendored
11
lib/module/env/env_bean.dart
vendored
@@ -10,18 +10,11 @@ class EnvBean {
|
||||
String? name;
|
||||
String? remarks;
|
||||
|
||||
EnvBean(
|
||||
{this.value,
|
||||
this.sId,
|
||||
this.created,
|
||||
this.status,
|
||||
this.timestamp,
|
||||
this.name,
|
||||
this.remarks});
|
||||
EnvBean({this.value, this.sId, this.created, this.status, this.timestamp, this.name, this.remarks});
|
||||
|
||||
EnvBean.fromJson(Map<String, dynamic> json) {
|
||||
value = json['value'];
|
||||
sId = json['_id'];
|
||||
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||
created = json['created'];
|
||||
status = json['status'];
|
||||
timestamp = json['timestamp'];
|
||||
|
||||
@@ -43,7 +43,7 @@ class TaskBean {
|
||||
command = json['command'].toString();
|
||||
schedule = json['schedule'].toString();
|
||||
saved = json['saved'];
|
||||
sId = json['_id'].toString();
|
||||
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||
created = json['created'];
|
||||
status = json['status'];
|
||||
timestamp = json['timestamp'].toString();
|
||||
|
||||
Reference in New Issue
Block a user