fixed broadcast bug

This commit is contained in:
2023-02-25 01:10:59 +00:00
parent 4011f3e83f
commit d42cde1b6f
3 changed files with 41 additions and 2 deletions

View File

@@ -81,6 +81,15 @@ func RemoveTableGameSession(db *gorm.DB) (*gorm.DB, error) {
return db, nil
}
func RemoveTableGameSessionID(db *gorm.DB, id string) (*gorm.DB, error) {
var gameSession GameSession
// Creates table of type GameSessions
db.Where("game_session_id = ?", id).Delete(&gameSession)
// returns variable DB of type *gorm.DB and error
// which is nil at the current moment
return db, nil
}
// DisplayGameSessions Returns all the rows of all the game session information
// to display
func DisplayGameSessions(db *gorm.DB) ([]*GameSession, error) {