1234
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user