refactor share to share_web

This commit is contained in:
tickstep 2024-10-26 14:53:13 +08:00
parent 7ebaf6ec17
commit 1e2bcee3e7
2 changed files with 6 additions and 5 deletions

View File

@ -30,11 +30,12 @@ import (
"time"
)
func CmdShare() cli.Command {
// web端分享接口
func CmdShareWeb() cli.Command {
return cli.Command{
Name: "share",
Name: "sharew",
Usage: "分享文件/目录",
UsageText: cmder.App().Name + " share",
UsageText: cmder.App().Name + " sharew",
Category: "阿里云盘",
Before: ReloadConfigFunc,
Action: func(c *cli.Context) error {
@ -286,7 +287,7 @@ func RunShareSet(modeFlag, driveId string, paths []string, expiredTime string, s
fmt.Printf("链接:%s\n", r.ShareUrl)
} else {
// 分享
r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan_web.ShareCreateParam{
r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan.ShareCreateParam{
DriveId: driveId,
SharePwd: sharePwd,
Expiration: expiredTime,

View File

@ -710,7 +710,7 @@ func main() {
command.CmdXcp(),
// 分享文件/目录 share
command.CmdShare(),
command.CmdShareWeb(),
// 保存分享文件/目录 save
command.CmdSave(),