release v1.2.0

This commit is contained in:
dushixiang
2021-10-31 17:15:35 +08:00
parent 4665ab6f78
commit 6132a05786
173 changed files with 37928 additions and 9349 deletions

View File

@ -1,7 +1,6 @@
package repository
import (
"next-terminal/pkg/guacd"
"next-terminal/server/model"
"gorm.io/gorm"
@ -33,6 +32,10 @@ func (r PropertyRepository) UpdateByName(o *model.Property, name string) error {
return r.DB.Updates(o).Error
}
func (r PropertyRepository) DeleteByName(name string) error {
return r.DB.Where("name = ?", name).Delete(model.Property{}).Error
}
func (r PropertyRepository) FindByName(name string) (o model.Property, err error) {
err = r.DB.Where("name = ?", name).First(&o).Error
return
@ -46,19 +49,3 @@ func (r PropertyRepository) FindAllMap() map[string]string {
}
return propertyMap
}
func (r PropertyRepository) GetDrivePath() (string, error) {
property, err := r.FindByName(guacd.DrivePath)
if err != nil {
return "", err
}
return property.Value, nil
}
func (r PropertyRepository) GetRecordingPath() (string, error) {
property, err := r.FindByName(guacd.RecordingPath)
if err != nil {
return "", err
}
return property.Value, nil
}