mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
支持脚本的编辑删除
This commit is contained in:
@@ -66,6 +66,16 @@ class Api {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> updatePassword(String name, String password) async {
|
||||
return await Http.put<NullResponse>(
|
||||
Url.updatePassword,
|
||||
{
|
||||
"username": name,
|
||||
"password": password,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<String>> inTimeLog(String cron) async {
|
||||
return await Http.get<String>(
|
||||
Url.intimeLog(cron),
|
||||
@@ -225,6 +235,27 @@ class Api {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> updateScript(String name, String path, String content) async {
|
||||
return await Http.put<NullResponse>(
|
||||
Url.scriptDetail,
|
||||
{
|
||||
"filename": name,
|
||||
"path": path,
|
||||
"content": content,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> delScript(String name, String path) async {
|
||||
return await Http.delete<NullResponse>(
|
||||
Url.scriptDetail,
|
||||
{
|
||||
"filename": name,
|
||||
"path": path,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<String>> scriptDetail(String name, String? path) async {
|
||||
return await Http.get<String>(
|
||||
Url.scriptDetail + name,
|
||||
|
||||
Reference in New Issue
Block a user