16 lines
264 B
Go
16 lines
264 B
Go
package controllers
|
|
|
|
import (
|
|
"InfrantrySkillCalculator/models"
|
|
"github.com/gin-gonic/gin"
|
|
"net/http"
|
|
)
|
|
|
|
// GetAllPlayers GET /player
|
|
func GetAllPlayers(c *gin.Context) {
|
|
var players []models.Player
|
|
models.DB.Find(&players)
|
|
|
|
c.JSON(http.StatusOK, players)
|
|
}
|