@@ -89,20 +89,34 @@ public function markResolved(string $type, int $fileId, bool $resolved = true):
8989 return new JSONResponse ($ this ->service ->markResolved ($ type , $ fileId , $ resolved ), Http::STATUS_OK );
9090 }
9191
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+
92104 /**
93105 * @NoAdminRequired
94106 * @NoCSRFRequired
95107 *
96108 * @param string $targetDirectoryIds
97109 * @param string $excludeList
98110 * @param string $collectorSettings
111+ * @param string $name
99112 */
100- public function runTask ($ targetDirectoryIds , $ excludeList , $ collectorSettings ): JSONResponse {
113+ public function runTask ($ targetDirectoryIds , $ excludeList , $ collectorSettings, $ name ): JSONResponse {
101114 if ($ targetDirectoryIds !== null && $ excludeList !== null && $ collectorSettings !== null ) {
102115 $ params = [
103116 'targetDirectoryIds ' => json_decode ($ targetDirectoryIds ),
104117 'excludeList ' => $ excludeList ,
105- 'collectorSettings ' => $ collectorSettings
118+ 'collectorSettings ' => $ collectorSettings ,
119+ 'name ' => $ name ,
106120 ];
107121 return new JSONResponse ($ this ->service ->runTask ($ params ), Http::STATUS_OK );
108122 } else {
@@ -121,8 +135,9 @@ public function runTask($targetDirectoryIds, $excludeList, $collectorSettings):
121135 * @param string $targetDirectoryIds
122136 * @param string $excludeList
123137 * @param string $collectorSettings
138+ * @param string $name
124139 */
125- public function restartTask ($ taskId , $ targetDirectoryIds , $ excludeList , $ collectorSettings ): JSONResponse {
140+ public function restartTask ($ taskId , $ targetDirectoryIds , $ excludeList , $ collectorSettings, $ name ): JSONResponse {
126141 if (
127142 $ taskId !== null && $ targetDirectoryIds !== null
128143 && $ excludeList !== null && $ collectorSettings !== null
@@ -131,7 +146,8 @@ public function restartTask($taskId, $targetDirectoryIds, $excludeList, $collect
131146 'taskId ' => $ taskId ,
132147 'targetDirectoryIds ' => json_decode ($ targetDirectoryIds ),
133148 'excludeList ' => $ excludeList ,
134- 'collectorSettings ' => $ collectorSettings
149+ 'collectorSettings ' => $ collectorSettings ,
150+ 'name ' => $ name ,
135151 ];
136152 return new JSONResponse ($ this ->service ->restartTask ($ params ), Http::STATUS_OK );
137153 } else {
0 commit comments