api_router.go 1.4 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/port/beego/controllers"
	"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/port/beego/middleware"
)

func init() {
	web.InsertFilter("/api/app-table-file/*", web.BeforeRouter, middleware.AppAccessFilter())
	web.Router("/api/app-table-file/create", &controllers.FileController{}, "Post:CreateAppTableFile")
	web.Router("/api/app-table-file/delete", &controllers.FileController{}, "Post:DeleteAppTableFile")
	web.Router("/api/app-table-file/append-data", &controllers.FileController{}, "Post:AppendDataAppTableFile")
	web.Router("/api/app-table-file/list", &controllers.FileController{}, "Post:ListAppTableFile")
	web.Router("/api/app-table-file/update", &controllers.FileController{}, "Post:UpdateAppTableFile")

	web.Router("/api/business-table/show-business-databases", &controllers.TableController{}, "Post:ShowBusinessDatabases")
	web.Router("/api/business-table/show-tables", &controllers.TableController{}, "Post:ShowBusinessTables")
	web.Router("/api/business-table/query-table", &controllers.TableController{}, "Post:QueryBusinessTable")
	web.Router("/api/business-table/update", &controllers.TableController{}, "Post:UpdateBusinessTable")
	web.Router("/api/business-table/generate", &controllers.TableController{}, "Post:GenerateBusinessTable")
}