feat: rename configType/providerType to provider

This commit is contained in:
Fu Diwei
2025-01-03 22:20:34 +08:00
parent 849e065bb2
commit e695c8ee5c
20 changed files with 192 additions and 87 deletions

View File

@@ -25,9 +25,9 @@ export const remove = async (record: MaybeModelRecordWithId<AccessModel>) => {
record = { ...record, deleted: dayjs.utc().format("YYYY-MM-DD HH:mm:ss") };
// TODO: 仅为兼容旧版本,后续迭代时删除
if ("configType" in record && record.configType === "httpreq") record.configType = "acmehttpreq";
if ("configType" in record && record.configType === "tencent") record.configType = "tencentcloud";
if ("configType" in record && record.configType === "pdns") record.configType = "powerdns";
if ("provider" in record && record.provider === "httpreq") record.provider = "acmehttpreq";
if ("provider" in record && record.provider === "tencent") record.provider = "tencentcloud";
if ("provider" in record && record.provider === "pdns") record.provider = "powerdns";
await getPocketBase().collection(COLLECTION_NAME).update<AccessModel>(record.id!, record);
};