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) {
|
if (id != null) {
|
||||||
data["_id"] = id;
|
data["_id"] = id;
|
||||||
|
data["id"] = id;
|
||||||
return await Http.put<NullResponse>(
|
return await Http.put<NullResponse>(
|
||||||
Url.addTask,
|
Url.addTask,
|
||||||
data,
|
data,
|
||||||
@@ -207,6 +208,7 @@ class Api {
|
|||||||
|
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
data["_id"] = id;
|
data["_id"] = id;
|
||||||
|
data["id"] = id;
|
||||||
return await Http.put<NullResponse>(
|
return await Http.put<NullResponse>(
|
||||||
Url.addEnv,
|
Url.addEnv,
|
||||||
data,
|
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? name;
|
||||||
String? remarks;
|
String? remarks;
|
||||||
|
|
||||||
EnvBean(
|
EnvBean({this.value, this.sId, this.created, this.status, this.timestamp, this.name, this.remarks});
|
||||||
{this.value,
|
|
||||||
this.sId,
|
|
||||||
this.created,
|
|
||||||
this.status,
|
|
||||||
this.timestamp,
|
|
||||||
this.name,
|
|
||||||
this.remarks});
|
|
||||||
|
|
||||||
EnvBean.fromJson(Map<String, dynamic> json) {
|
EnvBean.fromJson(Map<String, dynamic> json) {
|
||||||
value = json['value'];
|
value = json['value'];
|
||||||
sId = json['_id'];
|
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||||
created = json['created'];
|
created = json['created'];
|
||||||
status = json['status'];
|
status = json['status'];
|
||||||
timestamp = json['timestamp'];
|
timestamp = json['timestamp'];
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class TaskBean {
|
|||||||
command = json['command'].toString();
|
command = json['command'].toString();
|
||||||
schedule = json['schedule'].toString();
|
schedule = json['schedule'].toString();
|
||||||
saved = json['saved'];
|
saved = json['saved'];
|
||||||
sId = json['_id'].toString();
|
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||||
created = json['created'];
|
created = json['created'];
|
||||||
status = json['status'];
|
status = json['status'];
|
||||||
timestamp = json['timestamp'].toString();
|
timestamp = json['timestamp'].toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user