mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
add pin
This commit is contained in:
@@ -51,4 +51,12 @@ class Api {
|
||||
static Future<HttpResponse<NullResponse>> delTask(String cron) async {
|
||||
return await Http.delete<NullResponse>(Url.ADD_TASK, [cron]);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> pinTask(String cron) async {
|
||||
return await Http.put<NullResponse>(Url.PIN_TASK, [cron]);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> unpinTask(String cron) async {
|
||||
return await Http.put<NullResponse>(Url.UNPIN_TASK, [cron]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ class Url {
|
||||
static const STOP_TASKS = "/api/crons/stop";
|
||||
static const TASK_DETAIL = "/api/crons/";
|
||||
static const ADD_TASK = "/api/crons";
|
||||
static const PIN_TASK = "/api/crons/pin";
|
||||
static const UNPIN_TASK = "/api/crons/unpin";
|
||||
|
||||
static INTIME_LOG(String cronId) {
|
||||
return "/api/crons/$cronId/log";
|
||||
|
||||
Reference in New Issue
Block a user