2023-06-11 03:08:16 +00:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gin-gonic/gin"
|
2024-01-28 11:38:58 +00:00
|
|
|
"github.com/songquanpeng/one-api/common"
|
2023-06-11 03:08:16 +00:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetGroups(c *gin.Context) {
|
|
|
|
groupNames := make([]string, 0)
|
2024-02-12 13:35:40 +00:00
|
|
|
for groupName := range common.GroupRatio {
|
2023-06-11 03:08:16 +00:00
|
|
|
groupNames = append(groupNames, groupName)
|
|
|
|
}
|
|
|
|
c.JSON(http.StatusOK, gin.H{
|
|
|
|
"success": true,
|
|
|
|
"message": "",
|
|
|
|
"data": groupNames,
|
|
|
|
})
|
|
|
|
}
|