Skip to content

Commit

Permalink
drive: added file revision restoration.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmichelo committed Apr 7, 2024
1 parent 7b964c0 commit 13d15af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions link_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ func (c *Client) UpdateRevision(ctx context.Context, shareID, linkID, revisionID
return r.SetBody(req).Put("/drive/shares/" + shareID + "/files/" + linkID + "/revisions/" + revisionID)
})
}

func (c *Client) RestoreRevision(ctx context.Context, shareID, linkID, revisionID string) error {
return c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
return r.Post("/drive/shares/" + shareID + "/files/" + linkID + "/revisions/" + revisionID + "/restore")
})
}

0 comments on commit 13d15af

Please sign in to comment.