3 Commits
9 changed files with 21 additions and 13 deletions
+8
View File
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.5.2](https://github.com/Li4n0/revsuit/compare/v0.5.1...v0.5.2) (2022-11-16)
### Bug Fixes
* fix bug that the files associated with records still exist after deleting mysql and ftp records ([5e80591](https://github.com/Li4n0/revsuit/commit/5e80591c856a63c851ba5e17812af89373d76cf5))
* fix panic when update config ([#62](https://github.com/Li4n0/revsuit/issues/62)) ([48f55c5](https://github.com/Li4n0/revsuit/commit/48f55c53273fcea579c9fdfaf2939c90df3588b1))
### [0.5.1](https://github.com/Li4n0/revsuit/compare/v0.5.0...v0.5.1) (2022-09-13)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
type File struct {
ID uint `gorm:"primarykey" form:"id" json:"id"`
RecordID uint `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
RecordID uint `json:"-"`
Name string `json:"name"`
Content []byte `json:"-"`
}
+2 -2
View File
@@ -204,9 +204,9 @@ func (s *Server) Run() {
defer func() {
if s.Enable {
log.Error("DNS Server exited unexpectedly")
s.Enable = false
s.livingLock.Unlock()
}
s.Enable = false
s.livingLock.Unlock()
}()
if err := s.UpdateRules(); err != nil {
+2 -2
View File
@@ -359,9 +359,9 @@ func (s *Server) Run() {
defer func() {
if s.Enable {
log.Error("FTP Server exited unexpectedly")
s.Enable = false
s.livingLock.Unlock()
}
s.Enable = false
s.livingLock.Unlock()
}()
if err := s.UpdateRules(); err != nil {
+1 -1
View File
@@ -24,7 +24,7 @@ type Record struct {
Path string `form:"path" json:"path"`
Method Method `form:"method" json:"method"`
Status Status `form:"status" json:"status"`
File *file.FTPFile `form:"file" json:"file" notice:"-"`
File *file.FTPFile `gorm:"foreignKey:RecordID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" form:"file" json:"file" notice:"-"`
Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"`
}
+2 -2
View File
@@ -156,9 +156,9 @@ func (s *Server) Run() {
defer func() {
if s.Enable {
log.Error("LDAP Server exited unexpectedly")
s.Enable = false
s.livingLock.Unlock()
}
s.Enable = false
s.livingLock.Unlock()
}()
if err := s.UpdateRules(); err != nil {
+2 -2
View File
@@ -284,9 +284,9 @@ func (s *Server) Run() {
defer func() {
if s.Enable {
log.Error("MySQL Server exited unexpectedly")
s.Enable = false
s.livingLock.Unlock()
}
s.Enable = false
s.livingLock.Unlock()
}()
if err := s.UpdateRules(); err != nil {
log.Error(err.Error())
+1 -1
View File
@@ -23,7 +23,7 @@ type Record struct {
Schema string `gorm:"index" form:"schema" json:"schema" notice:"schema"`
ClientOS string `gorm:"index" form:"client_os" json:"client_os" notice:"client_os"`
LoadLocalData bool `gorm:"index" form:"load_local_data" json:"load_local_data" notice:"load_local_data"`
Files []file.MySQLFile `form:"-" json:"files" notice:"-"`
Files []file.MySQLFile `gorm:"foreignKey:RecordID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" form:"-" json:"files" notice:"-" `
Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"`
}
+2 -2
View File
@@ -165,9 +165,9 @@ func (s *Server) Run() {
defer func() {
if s.Enable {
log.Error("RMI Server exited unexpectedly")
s.Enable = false
s.livingLock.Unlock()
}
s.Enable = false
s.livingLock.Unlock()
}()
if err := s.UpdateRules(); err != nil {