Commit Graph

24 Commits

Author SHA1 Message Date
Ming Deng 650fde66aa Revert "Merge pull request #4254 from astaxie/develop-2.0"
This reverts commit e284b0ddae, reversing
changes made to 8ef8fd2606.
2020-11-26 17:48:29 +08:00
Ming Deng b4a85c8f13 Remove files 2020-08-16 23:09:19 +08:00
Ming Deng 882aa9b967 Deprecated old web module 2020-08-05 21:57:20 +08:00
JessonChan 0d54bbff02 make staticcheck happy 2019-01-22 19:09:57 +08:00
Faissal Elamraoui bf6bd6b292 Fixes #2587
Fixes warnings and errors raised by gometalinter and gosimple.
2017-04-23 19:19:05 +02:00
JessonChan 8660a54fac make router fast 2016-03-15 11:49:23 +08:00
astaxie 22196d7841 add mis function NSHandler 2016-03-11 09:21:13 +08:00
astaxie 67b36d7c48 make golint happy 2015-09-08 21:41:38 +08:00
JessonChan b26ef5b2e5 typo fixed
registor==>register
innner ==> inner
2015-07-27 08:44:58 +08:00
astaxie 3aceaf8838 error support controller 2015-02-26 23:34:43 +08:00
astaxie da127bbc22 fix #855 #859 2014-10-31 16:31:23 +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 1f6e689e5d beego: fix #652 2014-06-23 15:28:29 +08:00
astaxie 117904be73 beego:fix the some regexp routes to different func 2014-06-12 23:08:05 +08:00
astaxie 00b710e168 beego:namespace sub router add url to pattern 2014-06-11 23:51:19 +08:00
astaxie 4786fb0948 beego:fix typo NewControllerRegister 2014-06-10 20:12:57 +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 6c8a7f1382 beego: router change to method Tree 2014-06-09 10:11:37 +08:00
astaxie e00eab7f49 beego: change to tree 2014-06-08 20:24:07 +08:00
astaxie 5dee6b7d19 beego: fix the namespace cond 2014-05-28 10:23:31 +08:00
astaxie 0d17d974cd beego: update namespace 2014-05-23 15:56:25 +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