Skip to content

Commit

Permalink
fix(sys server): fix get tags missing appid;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Sep 22, 2021
1 parent 470e148 commit 164fc85
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/system-server/src/router/function/get.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: Maslow<wangfugen@126.com>
* @Date: 2021-08-30 16:51:19
* @LastEditTime: 2021-09-10 01:44:34
* @LastEditTime: 2021-09-22 11:45:06
* @Description:
*/

Expand Down Expand Up @@ -95,7 +95,7 @@ export async function handleGetFunctionById(req: Request, res: Response) {

// do db query
const ret = await coll
.where({ _id: func_id })
.where({ _id: func_id, appid: app.appid })
.getOne<CloudFunctionStruct>()

return res.send({
Expand All @@ -120,7 +120,8 @@ export async function handleGetAllFunctionTags(req: Request, res: Response) {

const docs = await db.collection<FunctionStruct>(Constants.cn.functions)
.find({
tags: { $exists: true, $ne: [] }
tags: { $exists: true, $ne: [] },
appid: app.appid
}, {
projection: { tags: 1 }
})
Expand Down

0 comments on commit 164fc85

Please sign in to comment.