fix: workflow delete error (#2879)
* fix: workflow delete key error * fix: chat auth error
This commit is contained in:
@@ -44,6 +44,7 @@ async function handler(
|
||||
per: ReadPermissionVal
|
||||
})
|
||||
]);
|
||||
|
||||
if (!app) {
|
||||
return Promise.reject(AppErrEnum.unExist);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ async function handler(
|
||||
|
||||
// auth chat permission
|
||||
if (chat && !app.permission.hasManagePer && String(tmbId) !== String(chat?.tmbId)) {
|
||||
throw new Error(ChatErrEnum.unAuthChat);
|
||||
return Promise.reject(ChatErrEnum.unAuthChat);
|
||||
}
|
||||
|
||||
// get app and history
|
||||
|
||||
@@ -32,7 +32,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
// auth chat permission
|
||||
if (chat && chat.outLinkUid !== uid) {
|
||||
throw new Error(ChatErrEnum.unAuthChat);
|
||||
return Promise.reject(ChatErrEnum.unAuthChat);
|
||||
}
|
||||
|
||||
const { nodes, chatConfig } = await getAppLatestVersion(app._id, app);
|
||||
|
||||
@@ -37,7 +37,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
// auth chat permission
|
||||
if (chat && chat.outLinkUid !== uid) {
|
||||
throw new Error(ChatErrEnum.unAuthChat);
|
||||
return Promise.reject(ChatErrEnum.unAuthChat);
|
||||
}
|
||||
|
||||
// get app and history
|
||||
|
||||
Reference in New Issue
Block a user