Skip to content

Commit dd654ff

Browse files
committed
feat: remove Action object
1 parent e302b10 commit dd654ff

File tree

23 files changed

+64
-772
lines changed

23 files changed

+64
-772
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ tmpFiles/
2323
logs/
2424
lastupdate.tmp
2525
commentsRouter*.go
26-
acme_account.key
26+
acme_account.key

controllers/action.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func main() {
3434
proxy.InitHttpClient()
3535
object.InitSiteMap()
3636
object.InitRuleMap()
37-
object.InitActionMap()
3837
run.InitAppMap()
3938
run.InitRdsClient()
4039
run.InitSelfStart()

object/action.go

Lines changed: 0 additions & 108 deletions
This file was deleted.

object/action_cache.go

Lines changed: 0 additions & 65 deletions
This file was deleted.

object/ormer.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,4 @@ func (a *Ormer) createTable() {
198198
if err != nil {
199199
panic(err)
200200
}
201-
202-
err = a.Engine.Sync2(new(Action))
203-
if err != nil {
204-
panic(err)
205-
}
206201
}

object/rule.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type Rule struct {
3636
Type string `xorm:"varchar(100) notnull" json:"type"`
3737
Expressions []*Expression `xorm:"mediumtext" json:"expressions"`
3838
Action string `xorm:"varchar(100) notnull" json:"action"`
39+
StatusCode int `xorm:"int notnull" json:"statusCode"`
3940
Reason string `xorm:"varchar(100) notnull" json:"reason"`
4041
}
4142

routers/router.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,4 @@ func initAPI() {
6868
beego.Router("/api/add-rule", &controllers.ApiController{}, "POST:AddRule")
6969
beego.Router("/api/update-rule", &controllers.ApiController{}, "POST:UpdateRule")
7070
beego.Router("/api/delete-rule", &controllers.ApiController{}, "POST:DeleteRule")
71-
72-
beego.Router("/api/get-actions", &controllers.ApiController{}, "GET:GetActions")
73-
beego.Router("/api/get-action", &controllers.ApiController{}, "GET:GetAction")
74-
beego.Router("/api/add-action", &controllers.ApiController{}, "POST:AddAction")
75-
beego.Router("/api/update-action", &controllers.ApiController{}, "POST:UpdateAction")
76-
beego.Router("/api/delete-action", &controllers.ApiController{}, "POST:DeleteAction")
7771
}

0 commit comments

Comments
 (0)