fix: casbin gorm-adapter has no sqlite3 support

Signed-off-by: closetool <c299999999@qq.com>
This commit is contained in:
closetool
2021-04-04 21:32:23 +08:00
parent 4faa807c53
commit 146b0b2925
33 changed files with 229 additions and 240 deletions

View File

@@ -82,7 +82,7 @@ func FindFile(c *gin.Context) {
global.GVA_LOG.Error("查找失败!", zap.Any("err", err))
response.FailWithMessage("查找失败", c)
} else {
response.OkWithDetailed(response.FileResponse{File: file},"查找成功", c)
response.OkWithDetailed(response.FileResponse{File: file}, "查找成功", c)
}
}
@@ -122,7 +122,7 @@ func RemoveChunk(c *gin.Context) {
err = service.DeleteFileChunk(fileMd5, fileName, filePath)
if err != nil {
global.GVA_LOG.Error("缓存切片删除失败!", zap.Any("err", err))
response.FailWithDetailed(response.FilePathResponse{FilePath: filePath},"缓存切片删除失败", c)
response.FailWithDetailed(response.FilePathResponse{FilePath: filePath}, "缓存切片删除失败", c)
} else {
response.OkWithDetailed(response.FilePathResponse{FilePath: filePath}, "缓存切片删除成功", c)
}

View File

@@ -69,7 +69,7 @@ func CheckFileMd5(c *gin.Context) {
response.OkWithDetailed(gin.H{
"chunks": chunks,
"isDone": isDone,
},"查询成功", c)
}, "查询成功", c)
}
}

View File

@@ -148,7 +148,6 @@ func GetAllApis(c *gin.Context) {
}
}
// @Tags SysApi
// @Summary 删除选中Api
// @Security ApiKeyAuth
@@ -164,6 +163,6 @@ func DeleteApisByIds(c *gin.Context) {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功",c)
response.OkWithMessage("删除成功", c)
}
}
}

View File

@@ -51,4 +51,3 @@ func GetPolicyPathByAuthorityId(c *gin.Context) {
paths := service.GetPolicyPathByAuthorityId(casbin.AuthorityId)
response.OkWithDetailed(response.PolicyPathResponse{Paths: paths}, "获取成功", c)
}

View File

@@ -214,6 +214,6 @@ func GetMenuList(c *gin.Context) {
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
},"获取成功", c)
}, "获取成功", c)
}
}
}