mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-06 00:05:30 +00:00
fix(accounts): reject wildcard model whitelist entries
Prevent adding models with wildcard characters and show an info message.
This commit is contained in:
1 parent
530c5e3a4f
commit
97705d147e
1 file changed
+4
@@ -278,6 +278,10 @@ const copyModelId = async (model: string) => {
|
||||
const addCustom = () => {
|
||||
const model = customModel.value.trim()
|
||||
if (!model) return
|
||||
if (model.includes('*')) {
|
||||
appStore.showInfo(t('admin.accounts.modelWildcardNotSupported'))
|
||||
return
|
||||
}
|
||||
if (props.modelValue.includes(model)) {
|
||||
appStore.showInfo(t('admin.accounts.modelExists'))
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user