github-code-scanning[bot] commented on code in PR #12552:
URL:
https://github.com/apache/dolphinscheduler/pull/12552#discussion_r1007134335
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java:
##########
@@ -270,6 +270,26 @@
return resourceService.delete(loginUser, fullName, tenantCode);
}
+ /**
+ * delete DATA_TRANSFER data
+ *
+ * @param loginUser login user
+ * @return delete result code
+ */
+ @Operation(summary = "deleteDataTransferData", description = "Delete the N
days ago data of DATA_TRANSFER ")
+ @Parameters({
+ @Parameter(name = "days", description = "N days ago", required =
true, schema = @Schema(implementation = String.class, example = "test/"))
+ })
+ @DeleteMapping(value = "/data-transfer-delete")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(DELETE_RESOURCE_ERROR)
+ @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+ public Map<String, Object> deleteDataTransferData(@Parameter(hidden =
true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @RequestParam(value =
"days") Integer days,
+ @RequestParam(value =
"tenantCode", required = false) String tenantCode) throws Exception {
Review Comment:
## Useless parameter
The parameter 'tenantCode' is never used.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/2144)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]