Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SituChengxiang committed Sep 14, 2024
2 parents 9f3d226 + 8a60720 commit 09a9e8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Forum/internal/services/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func init() {
zerolog.SetGlobalLevel(zerolog.InfoLevel)

// 创建一个日志文件,并设置日志格式
file, err := os.OpenFile("./log/log.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
file, err := os.OpenFile("./log/log.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions Forum/internal/utils/jsonResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ func JsonSuccessResponse(c *gin.Context, data interface{}) {

// 服务器返回了一些奇怪的错误
func JsonErrorResponse(c *gin.Context, code int, msg string) {
JsonResponse(c, http.StatusInternalServerError, code, msg, nil)
JsonResponse(c, 200, code, msg, nil)
}

// 数据内部发生了一些奇怪的错误
func JsonInternalServerErrorResponse(c *gin.Context, msg string) {
JsonResponse(c, http.StatusInternalServerError, 200500, msg, nil)
JsonResponse(c, 200, 200500, msg, nil)
}

// 未授权的访问
Expand Down

0 comments on commit 09a9e8d

Please sign in to comment.