@@ -43,7 +43,7 @@ module.exports = app => {
4343 }
4444 }
4545 const resources = yield this . service . api . getRichList ( condition , page , limit , order )
46- const count = yield app . model . api . find ( condition ) . count ( ) . exec ( )
46+ const count = yield app . model . Api . find ( condition ) . count ( ) . exec ( )
4747 this . ctx . body = { resources, pages : { limit, page, count } }
4848 this . ctx . status = 200
4949 }
@@ -114,7 +114,7 @@ module.exports = app => {
114114 assert ( mongoose . Types . ObjectId . isValid ( groupId ) , 403 , 'invalid groupId' )
115115 assert ( mongoose . Types . ObjectId . isValid ( apiId ) , 403 , 'invalid apiId' )
116116
117- const resources = ( yield app . model . api . findOne ( { _id : apiId , isDeleted : false } ) ) . toObject ( )
117+ const resources = ( yield app . model . Api . findOne ( { _id : apiId , isDeleted : false } ) ) . toObject ( )
118118 resources . history = yield this . service . apiHistory . get ( resources )
119119
120120 this . ctx . body = { resources }
@@ -194,7 +194,7 @@ module.exports = app => {
194194 msg : '无权删除'
195195 } )
196196 }
197- yield app . model . group . update ( { _id : groupId } , { modifiedTime : Date . now ( ) } , { new : true } ) . exec ( )
197+ yield app . model . Group . update ( { _id : groupId } , { modifiedTime : Date . now ( ) } , { new : true } ) . exec ( )
198198 this . ctx . logger . info ( 'deleteApi' )
199199 this . ctx . status = 204
200200 }
0 commit comments