添加日志输出
This commit is contained in:
parent
a4df39afd5
commit
f759046b15
|
|
@ -5,6 +5,7 @@ import (
|
|||
"StuAcaWorksAI/proto"
|
||||
"StuAcaWorksAI/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
|
@ -34,6 +35,7 @@ func GetUserFileList(c *gin.Context) {
|
|||
var req GetUserFileListReq
|
||||
if err := c.ShouldBind(&req); err == nil {
|
||||
if req.Type == "all" {
|
||||
log.Println("get user file list by all")
|
||||
userFiles := service.FindUserFileList(userId, proto.UserFileTypeFile)
|
||||
c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "msg": "success", "data": userFiles})
|
||||
} else if req.Type == "search" {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"os"
|
||||
"path"
|
||||
|
|
@ -260,5 +261,6 @@ func FindUserFileList(userID int, uploadType string) []proto.UserFileListResp {
|
|||
r := proto.UserFileListResp{FileAuth: file, FileStoreName: fileStoreName}
|
||||
res = append(res, r)
|
||||
}
|
||||
log.Println("FindUserFileList res:", len(res))
|
||||
return res
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue