Created
November 8, 2021 22:19
-
-
Save KevinStrong/df3f771ec3f8fbf070b42bbc6b7491ca to your computer and use it in GitHub Desktop.
A golang func to link an event to a kiosk in the db using gorm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func linkKioskAndEvent(kioskID, eventID uint, db *gorm.DB) error { | |
| kioskEvent := KioskEvent{ | |
| KioskID: kioskID, | |
| EventID: eventID, | |
| } | |
| result := db.Create(&kioskEvent) | |
| return result.Error | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment