From db1f5fb142a61916cb41ea9940f9ef52403f5c75 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 28 May 2023 00:21:49 +0800 Subject: [PATCH] refactor: add PERMISSION.core.groupConfig require groupConfig require groupDetail permission --- client/shared/utils/role-helper.ts | 1 + server/plugins/com.msgbyte.linkmeta/utils/specialWebsiteMeta.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/shared/utils/role-helper.ts b/client/shared/utils/role-helper.ts index 9f201f95..d6484a69 100644 --- a/client/shared/utils/role-helper.ts +++ b/client/shared/utils/role-helper.ts @@ -79,6 +79,7 @@ export const getPermissionList = (): PermissionItemType[] => [ title: t('修改群组配置'), desc: t('允许成员修改群组配置'), default: false, + required: [PERMISSION.core.groupDetail], }, { key: PERMISSION.core.manageUser, diff --git a/server/plugins/com.msgbyte.linkmeta/utils/specialWebsiteMeta.ts b/server/plugins/com.msgbyte.linkmeta/utils/specialWebsiteMeta.ts index dea85412..ed8a0c4b 100644 --- a/server/plugins/com.msgbyte.linkmeta/utils/specialWebsiteMeta.ts +++ b/server/plugins/com.msgbyte.linkmeta/utils/specialWebsiteMeta.ts @@ -17,7 +17,7 @@ const specialWebsiteMetaFetchers = [ const { data } = await got( `https://api.bilibili.com/x/web-interface/view?bvid=${bvid}` - ).json(); + ).json(); const aid = _.get(data, 'aid'); const cid = _.get(data, 'cid');