您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
|
|
|
package routers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"beeblog/controllers"
|
|
|
|
beego "github.com/beego/beego/v2/server/web"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
beego.Router("/api/like/:id([0-9]+)", &controllers.LikeController{}, "get:Save")
|
|
|
|
beego.Router("/api/unlike/:id([0-9]+)", &controllers.LikeController{}, "get:Delete")
|
|
|
|
}
|