feat(explorer): manage created direct links / option to enable unique redirected direct links
This commit is contained in:
@@ -697,10 +697,18 @@ func initMasterRouter(dep dependency.Dep) *gin.Engine {
|
||||
)
|
||||
|
||||
// 取得文件外链
|
||||
file.PUT("source",
|
||||
controllers.FromJSON[explorer.GetDirectLinkService](explorer.GetDirectLinkParamCtx{}),
|
||||
middleware.ValidateBatchFileCount(dep, explorer.GetDirectLinkParamCtx{}),
|
||||
controllers.GetSource)
|
||||
source := file.Group("source")
|
||||
{
|
||||
source.PUT("",
|
||||
controllers.FromJSON[explorer.GetDirectLinkService](explorer.GetDirectLinkParamCtx{}),
|
||||
middleware.ValidateBatchFileCount(dep, explorer.GetDirectLinkParamCtx{}),
|
||||
controllers.GetSource,
|
||||
)
|
||||
source.DELETE(":id",
|
||||
middleware.HashID(hashid.SourceLinkID),
|
||||
controllers.DeleteDirectLink,
|
||||
)
|
||||
}
|
||||
// Patch view
|
||||
file.PATCH("view",
|
||||
controllers.FromJSON[explorer.PatchViewService](explorer.PatchViewParameterCtx{}),
|
||||
|
||||
Reference in New Issue
Block a user