readme updated

This commit is contained in:
ycc
2022-04-20 15:25:05 +02:00
parent 5f3238e9f6
commit 4be754b679
10 changed files with 140 additions and 26 deletions

View File

@ -70,6 +70,15 @@ func init() {
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["sqldb-ws/controllers:TableController"] = append(beego.GlobalControllerRouter["sqldb-ws/controllers:TableController"],
beego.ControllerComments{
Method: "TablePost",
Router: "/:table",
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["sqldb-ws/controllers:TableController"] = append(beego.GlobalControllerRouter["sqldb-ws/controllers:TableController"],
beego.ControllerComments{
Method: "GetAllTableColumn",

View File

@ -8,7 +8,6 @@
package routers
import (
"net/http"
"sqldb-ws/controllers"
beego "github.com/beego/beego/v2/server/web"
@ -19,11 +18,11 @@ func init() {
var FilterUser = func(ctx *context.Context) {
//session := ctx.Input.Session("user_id")
_, ok := ctx.Input.Session("user_id").(string)
if !ok {
ctx.Output.SetStatus(http.StatusUnauthorized)
ctx.Redirect(302, "/v1/l")
}
/* _, ok := ctx.Input.Session("user_id").(string)
if !ok {
ctx.Output.SetStatus(http.StatusUnauthorized)
ctx.Redirect(302, "/v1/l")
}*/
}
ns := beego.NewNamespace("/v1",