|
|
|
@ -20,6 +20,7 @@ type (
|
|
|
|
|
ShareCreateService struct {
|
|
|
|
|
Uri string `json:"uri" binding:"required"`
|
|
|
|
|
IsPrivate bool `json:"is_private"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
RemainDownloads int `json:"downloads"`
|
|
|
|
|
Expire int `json:"expire"`
|
|
|
|
|
ShareView bool `json:"share_view"`
|
|
|
|
@ -52,6 +53,7 @@ func (service *ShareCreateService) Upsert(c *gin.Context, existed int) (string,
|
|
|
|
|
|
|
|
|
|
share, err := m.CreateOrUpdateShare(c, uri, &manager.CreateShareArgs{
|
|
|
|
|
IsPrivate: service.IsPrivate,
|
|
|
|
|
Password: service.Password,
|
|
|
|
|
RemainDownloads: service.RemainDownloads,
|
|
|
|
|
Expire: expires,
|
|
|
|
|
ExistedShareID: existed,
|
|
|
|
|