"backend/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "f2e596f6eccc37fc6e960bcf6a004e66e50e8967"
Unverified Commit 2fe8932c authored by Call White's avatar Call White Committed by GitHub
Browse files

Merge pull request #3 from cyhhao/main

merge to main
parents 2f2e76f9 adb77af1
This diff is collapsed.
...@@ -94,9 +94,9 @@ func (h *GroupHandler) List(c *gin.Context) { ...@@ -94,9 +94,9 @@ func (h *GroupHandler) List(c *gin.Context) {
return return
} }
outGroups := make([]dto.Group, 0, len(groups)) outGroups := make([]dto.AdminGroup, 0, len(groups))
for i := range groups { for i := range groups {
outGroups = append(outGroups, *dto.GroupFromService(&groups[i])) outGroups = append(outGroups, *dto.GroupFromServiceAdmin(&groups[i]))
} }
response.Paginated(c, outGroups, total, page, pageSize) response.Paginated(c, outGroups, total, page, pageSize)
} }
...@@ -120,9 +120,9 @@ func (h *GroupHandler) GetAll(c *gin.Context) { ...@@ -120,9 +120,9 @@ func (h *GroupHandler) GetAll(c *gin.Context) {
return return
} }
outGroups := make([]dto.Group, 0, len(groups)) outGroups := make([]dto.AdminGroup, 0, len(groups))
for i := range groups { for i := range groups {
outGroups = append(outGroups, *dto.GroupFromService(&groups[i])) outGroups = append(outGroups, *dto.GroupFromServiceAdmin(&groups[i]))
} }
response.Success(c, outGroups) response.Success(c, outGroups)
} }
...@@ -142,7 +142,7 @@ func (h *GroupHandler) GetByID(c *gin.Context) { ...@@ -142,7 +142,7 @@ func (h *GroupHandler) GetByID(c *gin.Context) {
return return
} }
response.Success(c, dto.GroupFromService(group)) response.Success(c, dto.GroupFromServiceAdmin(group))
} }
// Create handles creating a new group // Create handles creating a new group
...@@ -177,7 +177,7 @@ func (h *GroupHandler) Create(c *gin.Context) { ...@@ -177,7 +177,7 @@ func (h *GroupHandler) Create(c *gin.Context) {
return return
} }
response.Success(c, dto.GroupFromService(group)) response.Success(c, dto.GroupFromServiceAdmin(group))
} }
// Update handles updating a group // Update handles updating a group
...@@ -219,7 +219,7 @@ func (h *GroupHandler) Update(c *gin.Context) { ...@@ -219,7 +219,7 @@ func (h *GroupHandler) Update(c *gin.Context) {
return return
} }
response.Success(c, dto.GroupFromService(group)) response.Success(c, dto.GroupFromServiceAdmin(group))
} }
// Delete handles deleting a group // Delete handles deleting a group
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment