mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-02 21:27:15 +08:00
refactor share to share_web
This commit is contained in:
parent
7ebaf6ec17
commit
1e2bcee3e7
@ -30,11 +30,12 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CmdShare() cli.Command {
|
// web端分享接口
|
||||||
|
func CmdShareWeb() cli.Command {
|
||||||
return cli.Command{
|
return cli.Command{
|
||||||
Name: "share",
|
Name: "sharew",
|
||||||
Usage: "分享文件/目录",
|
Usage: "分享文件/目录",
|
||||||
UsageText: cmder.App().Name + " share",
|
UsageText: cmder.App().Name + " sharew",
|
||||||
Category: "阿里云盘",
|
Category: "阿里云盘",
|
||||||
Before: ReloadConfigFunc,
|
Before: ReloadConfigFunc,
|
||||||
Action: func(c *cli.Context) error {
|
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)
|
fmt.Printf("链接:%s\n", r.ShareUrl)
|
||||||
} else {
|
} else {
|
||||||
// 分享
|
// 分享
|
||||||
r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan_web.ShareCreateParam{
|
r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan.ShareCreateParam{
|
||||||
DriveId: driveId,
|
DriveId: driveId,
|
||||||
SharePwd: sharePwd,
|
SharePwd: sharePwd,
|
||||||
Expiration: expiredTime,
|
Expiration: expiredTime,
|
Loading…
Reference in New Issue
Block a user