Add video download failure reporting feature
- Introduced a new API endpoint `POST /api/v1/video/remove_watermark/report_failure` for reporting download failures. - Added a new database table `video_download_failures` to store details about failed downloads, including domain, URL, error message, and reporting metadata. - Updated the video handler to process failure reports and save them to the database. - Enhanced documentation to include details about the new reporting feature and its usage.
This commit is contained in:
@@ -6,8 +6,10 @@ import (
|
||||
rmhandler "wx_service/internal/remove_watermark/handler"
|
||||
)
|
||||
|
||||
func registerRemoveWatermarkRoutes(protected *gin.RouterGroup, videoHandler *rmhandler.VideoHandler) {
|
||||
// 去水印相关接口(保持原有路径不变)
|
||||
func registerRemoveWatermarkRoutes(api *gin.RouterGroup, protected *gin.RouterGroup, videoHandler *rmhandler.VideoHandler) {
|
||||
// 去水印解析与广告解锁:需要登录鉴权
|
||||
protected.POST("/video/remove_watermark", videoHandler.RemoveWatermark)
|
||||
protected.POST("/video/remove_watermark/unlock", videoHandler.UnlockQuota)
|
||||
// 下载失败上报:供其他服务调用,无需鉴权
|
||||
api.POST("/video/remove_watermark/report_failure", videoHandler.ReportDownloadFailure)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user