mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 01:40:51 +00:00
fix: outlink manage can delete/update others (#2158)
* fix: outlink manage be able to delete/update others * fix: remove enum validation for teamMemberSchema. because the old data has the role property, which may cause unknown bug * perf: change findAndRemove to deleteOne
This commit is contained in:
@@ -25,7 +25,7 @@ export async function authOpenApiKeyCrud({
|
||||
const { openapi, permission } = await (async () => {
|
||||
const openapi = await MongoOpenApi.findOne({ _id: id, teamId });
|
||||
if (!openapi) {
|
||||
throw new Error(OpenApiErrEnum.unExist);
|
||||
return Promise.reject(OpenApiErrEnum.unExist);
|
||||
}
|
||||
|
||||
if (!!openapi.appId) {
|
||||
|
Reference in New Issue
Block a user