You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
825 B
33 lines
825 B
package http |
|
|
|
import ( |
|
"go-common/app/interface/main/creative/model/archive" |
|
"go-common/library/ecode" |
|
"go-common/library/log" |
|
bm "go-common/library/net/http/blademaster" |
|
"strconv" |
|
) |
|
|
|
// videoViewPoints get video highlight viewpoints |
|
func videoViewPoints(c *bm.Context) { |
|
var ( |
|
aid, cid int64 |
|
err error |
|
form = c.Request.Form |
|
vp *archive.ViewPointRow |
|
) |
|
if aid, err = strconv.ParseInt(form.Get("aid"), 10, 64); err != nil || aid <= 0 { |
|
c.JSON(nil, ecode.RequestErr) |
|
return |
|
} |
|
if cid, err = strconv.ParseInt(form.Get("cid"), 10, 64); err != nil || cid <= 0 { |
|
c.JSON(nil, ecode.RequestErr) |
|
return |
|
} |
|
if vp, err = arcSvc.VideoPoints(c, aid, cid); err != nil { |
|
log.Error("arcSvc.VideoPoints(%d,%d) error(%v)", aid, cid, err) |
|
c.JSON(nil, ecode.RequestErr) |
|
return |
|
} |
|
c.JSON(vp, nil) |
|
}
|
|
|