优化多账号
This commit is contained in:
@@ -86,7 +86,7 @@ export function saveCloudtentaclesSourceByKey(sourceKey: unknown, data: JsonObje
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a single source by key. Throws if key is 'default' (cannot delete default source).
|
||||
* Delete a single source by key.
|
||||
*/
|
||||
export function deleteCloudtentaclesSourceByKey(sourceKey: unknown) {
|
||||
const key = String(sourceKey || '').trim()
|
||||
@@ -96,12 +96,6 @@ export function deleteCloudtentaclesSourceByKey(sourceKey: unknown) {
|
||||
errorCode: 'cloudtentacles_source_key_required',
|
||||
})
|
||||
}
|
||||
if (key === 'default') {
|
||||
throw createHttpError('不能删除默认 cloudtentacles 账号', {
|
||||
statusCode: 409,
|
||||
errorCode: 'cloudtentacles_default_source_forbidden',
|
||||
})
|
||||
}
|
||||
|
||||
const config = loadCloudtentaclesSourcesConfigFromFile()
|
||||
const existingIndex = config.sources.findIndex(s => s.key === key)
|
||||
|
||||
Reference in New Issue
Block a user