Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 21, 2024
1 parent 3d2eb3a commit b1361fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/dbmodels/recording.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ type Recording struct {
Published int64 `gorm:"column:published;default:1;NOT NULL"`
CreationTime int64 `gorm:"column:creation_time;autoCreateTime;NOT NULL"`
RoomCreationTime int64 `gorm:"column:room_creation_time;default:0;NOT NULL"`
Created time.Time `gorm:"column:created;default:CURRENT_TIMESTAMP;NOT NULL"`
Modified time.Time `gorm:"column:modified;default:0000-00-00 00:00:00;NOT NULL"`
Created time.Time `gorm:"column:created;autoCreateTime;NOT NULL"`
Modified time.Time `gorm:"column:modified;autoUpdateTime;NOT NULL"`
}

func (m *Recording) TableName() string {
Expand Down
4 changes: 1 addition & 3 deletions pkg/services/db/room_modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ func (s *DatabaseService) UpdateRoomStatus(info *dbmodels.RoomInfo) (int64, erro
if info.IsRunning == 0 {
update["is_recording"] = 0
update["is_active_rtmp"] = 0
// important to set a proper format
// otherwise will have a timezone problem
update["ended"] = time.Now().UTC().Format("2006-01-02 15:04:05")
update["ended"] = time.Now()
}

var cond interface{}
Expand Down

0 comments on commit b1361fc

Please sign in to comment.