update , refactory model
This commit is contained in:
1 parent
b29a99f400
commit
e4d767373a
2 files changed
+42
No files matched your search
@@ -37,3 +37,30 @@ func GetFacebookIDs(c *context.Context) {
|
||||
|
||||
c.Success(map[string]interface{}{"list": ids})
|
||||
}
|
||||
|
||||
// UpdateFacebookPost -
|
||||
func UpdateFacebookPost(c *context.Context) {
|
||||
var err error
|
||||
type pageStruct struct {
|
||||
ID string `json:"id"`
|
||||
PostID string `json:"post_id"`
|
||||
Link string `json:"link"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
bodyArg := struct {
|
||||
Pages []pageStruct `json:"pages"`
|
||||
}{}
|
||||
|
||||
err = c.BindData(&bodyArg)
|
||||
if err != nil {
|
||||
c.DataFormat()
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range bodyArg.Pages {
|
||||
if len(v.ID) == 0 || len(v.PostID) == 0 {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user