File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ admin.linGet(
153153 v . get ( "query.page" ) ,
154154 v . get ( "query.count" )
155155 ) ;
156- if ( total < 1 ) {
156+ if ( groups . length < 1 ) {
157157 throw new NotFound ( {
158158 msg : "未找到任何权限组"
159159 } ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ log.linGet(
2323 async ctx => {
2424 const v = await new LogFindValidator ( ) . validate ( ctx ) ;
2525 const { rows, total } = await logDao . getLogs ( v ) ;
26- if ( total < 1 ) {
26+ if ( ! rows || rows . length < 1 ) {
2727 throw new NotFound ( {
2828 msg : "没有找到相关日志"
2929 } ) ;
@@ -48,7 +48,7 @@ log.linGet(
4848 const v = await new LogFindValidator ( ) . validate ( ctx ) ;
4949 const keyword = v . get ( "query.keyword" , false , "" ) ;
5050 const { rows, total } = await logDao . searchLogs ( v , keyword ) ;
51- if ( total < 1 ) {
51+ if ( ! rows || rows . length < 1 ) {
5252 throw new NotFound ( {
5353 msg : "没有找到相关日志"
5454 } ) ;
You can’t perform that action at this time.
0 commit comments