mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-18 21:11:04 +01:00
+api doc, fixed endpoints
This commit is contained in:
@@ -164,7 +164,7 @@ func HandleResponse(c *cfg.Config, resp *req.Response) error {
|
||||
|
||||
func UploadFiles(w io.Writer, c *cfg.Config, args []string) error {
|
||||
// setup url, req.Request, timeout handling etc
|
||||
rq := Setup(c, "/file/")
|
||||
rq := Setup(c, "/uploads/")
|
||||
|
||||
// collect files to upload from @argv
|
||||
if err := GatherFiles(rq, args); err != nil {
|
||||
@@ -220,7 +220,7 @@ func List(w io.Writer, c *cfg.Config, args []string) error {
|
||||
|
||||
func Delete(w io.Writer, c *cfg.Config, args []string) error {
|
||||
for _, id := range args {
|
||||
rq := Setup(c, "/file/"+id+"/")
|
||||
rq := Setup(c, "/uploads/"+id+"/")
|
||||
|
||||
resp, err := rq.R.Delete(rq.Url)
|
||||
|
||||
@@ -266,7 +266,7 @@ func Download(w io.Writer, c *cfg.Config, args []string) error {
|
||||
|
||||
id := args[0]
|
||||
|
||||
rq := Setup(c, "/file/"+id+"/")
|
||||
rq := Setup(c, "/uploads/"+id+"/")
|
||||
|
||||
if !c.Silent {
|
||||
// progres bar
|
||||
|
||||
Reference in New Issue
Block a user