This commit is contained in:
[Valentino Heman Budiarto]
2026-03-06 14:00:50 +07:00
parent 54088abf22
commit ff78042fe4
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/gin-gonic/gin"
)
// --- GET ALL ROOMS ---
// GET ALL ROOMS
func GetRooms(c *gin.Context) {
var rooms []models.Room
if err := config.DB.Find(&rooms).Error; err != nil {
@@ -18,7 +18,7 @@ func GetRooms(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"data": rooms})
}
// --- CREATE ROOM ---
// CREATE ROOM
func CreateRoom(c *gin.Context) {
var input models.Room
if err := c.ShouldBindJSON(&input); err != nil {