ysqi
|
4c0c0ec2a7
|
TplNames renamed TplName ,fix #1229,Remember modify bee tool.
|
2016-01-07 16:16:39 +08:00 |
|
fud
|
92711e80a3
|
refactor controller.go
|
2015-12-21 16:23:31 +08:00 |
|
astaxie
|
a144769515
|
update the documents & comments
|
2014-08-18 16:41:43 +08:00 |
|
astaxie
|
fefd8ddb5b
|
beego: update licence& fix #669
|
2014-07-03 23:40:21 +08:00 |
|
astaxie
|
0f170a80da
|
update the comments fix #658
|
2014-06-25 10:39:37 +08:00 |
|
astaxie
|
dbebf8df4b
|
beego:namespace support nest
ns := NewNamespace("/v3",
NSAutoRouter(&TestController{}),
NSNamespace("/shop",
NSGet("/order/:id", func(ctx *context.Context) {
ctx.Output.Body([]byte(ctx.Input.Param(":id")))
}),
),
)
|
2014-06-10 17:11:02 +08:00 |
|
astaxie
|
e00eab7f49
|
beego: change to tree
|
2014-06-08 20:24:07 +08:00 |
|
astaxie
|
e657dcfd5f
|
beego: support namespace
ns := beego.NewNamespace("/v1/api/")
ns.Cond(func(ctx *context.Context)bool{
if ctx.Input.Domain() == "www.beego.me" {
return true
}
return false
})
.Filter("before", Authenticate)
.Router("/order", &admin.OrderController{})
.Get("/version",func (ctx *context.Context) {
ctx.Output.Body([]byte("1.0.0"))
})
.Post("/login",func (ctx *context.Context) {
if ctx.Query("username") == "admin" && ctx.Query("username") ==
"password" {
}
})
.Namespace(
NewNamespace("/shop").
Get("/order/:id", func(ctx *context.Context) {
ctx.Output.Body([]byte(ctx.Input.Param(":id")))
}),
)
|
2014-05-17 02:26:51 +08:00 |
|