new leanote router for leanote's api
/api/user/info => convert it to ApiUser.Info()
This commit is contained in:
36
app/controllers/api/UserController.go
Normal file
36
app/controllers/api/UserController.go
Normal file
@ -0,0 +1,36 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/revel/revel"
|
||||
// "encoding/json"
|
||||
// "gopkg.in/mgo.v2/bson"
|
||||
. "github.com/leanote/leanote/app/lea"
|
||||
// "github.com/leanote/leanote/app/info"
|
||||
// "github.com/leanote/leanote/app/types"
|
||||
// "io/ioutil"
|
||||
// "fmt"
|
||||
// "math"
|
||||
// "os"
|
||||
// "path"
|
||||
// "strconv"
|
||||
)
|
||||
type User struct {
|
||||
*revel.Controller
|
||||
}
|
||||
|
||||
type ApiUser struct {
|
||||
*revel.Controller
|
||||
}
|
||||
|
||||
// 修改用户名, 需要重置session
|
||||
func (c ApiUser) Info() revel.Result {
|
||||
Log("APIUser");
|
||||
return c.RenderTemplate("home/index.html");
|
||||
// return nil;
|
||||
}
|
||||
|
||||
func (c User) Info() revel.Result {
|
||||
Log("APIUser");
|
||||
return c.RenderTemplate("home/index.html");
|
||||
// return nil;
|
||||
}
|
Reference in New Issue
Block a user