@@ -89,20 +89,34 @@ public function markResolved(string $type, int $fileId, bool $resolved = true):
89
89
return new JSONResponse ($ this ->service ->markResolved ($ type , $ fileId , $ resolved ), Http::STATUS_OK );
90
90
}
91
91
92
+ /**
93
+ * @NoAdminRequired
94
+ * @NoCSRFRequired
95
+ *
96
+ * @param string $type
97
+ *
98
+ * @return JSONResponse
99
+ */
100
+ public function cleanupResolved (string $ type ): JSONResponse {
101
+ return new JSONResponse ($ this ->service ->cleanupResolved ($ type ), Http::STATUS_OK );
102
+ }
103
+
92
104
/**
93
105
* @NoAdminRequired
94
106
* @NoCSRFRequired
95
107
*
96
108
* @param string $targetDirectoryIds
97
109
* @param string $excludeList
98
110
* @param string $collectorSettings
111
+ * @param string $name
99
112
*/
100
- public function runTask ($ targetDirectoryIds , $ excludeList , $ collectorSettings ): JSONResponse {
113
+ public function runTask ($ targetDirectoryIds , $ excludeList , $ collectorSettings, $ name ): JSONResponse {
101
114
if ($ targetDirectoryIds !== null && $ excludeList !== null && $ collectorSettings !== null ) {
102
115
$ params = [
103
116
'targetDirectoryIds ' => json_decode ($ targetDirectoryIds ),
104
117
'excludeList ' => $ excludeList ,
105
- 'collectorSettings ' => $ collectorSettings
118
+ 'collectorSettings ' => $ collectorSettings ,
119
+ 'name ' => $ name ,
106
120
];
107
121
return new JSONResponse ($ this ->service ->runTask ($ params ), Http::STATUS_OK );
108
122
} else {
@@ -121,8 +135,9 @@ public function runTask($targetDirectoryIds, $excludeList, $collectorSettings):
121
135
* @param string $targetDirectoryIds
122
136
* @param string $excludeList
123
137
* @param string $collectorSettings
138
+ * @param string $name
124
139
*/
125
- public function restartTask ($ taskId , $ targetDirectoryIds , $ excludeList , $ collectorSettings ): JSONResponse {
140
+ public function restartTask ($ taskId , $ targetDirectoryIds , $ excludeList , $ collectorSettings, $ name ): JSONResponse {
126
141
if (
127
142
$ taskId !== null && $ targetDirectoryIds !== null
128
143
&& $ excludeList !== null && $ collectorSettings !== null
@@ -131,7 +146,8 @@ public function restartTask($taskId, $targetDirectoryIds, $excludeList, $collect
131
146
'taskId ' => $ taskId ,
132
147
'targetDirectoryIds ' => json_decode ($ targetDirectoryIds ),
133
148
'excludeList ' => $ excludeList ,
134
- 'collectorSettings ' => $ collectorSettings
149
+ 'collectorSettings ' => $ collectorSettings ,
150
+ 'name ' => $ name ,
135
151
];
136
152
return new JSONResponse ($ this ->service ->restartTask ($ params ), Http::STATUS_OK );
137
153
} else {
0 commit comments