feat: Mock SMS (#1009)

1. Update go-sms-sender to v0.3.0.
2. Fix: avoid page crash if not found provider info.

Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com>

Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com>
This commit is contained in:
疯魔慕薇
2022-08-17 22:02:45 +08:00
committed by GitHub
parent aedef1eea1
commit 91fa024f0b
4 changed files with 19 additions and 5 deletions

View File

@ -137,7 +137,12 @@ export function getProviderUrl(provider) {
return `${urlObj.protocol}//${host}`;
} else {
return Setting.OtherProviderInfo[provider.category][provider.type].url;
const info = Setting.OtherProviderInfo[provider.category][provider.type];
// avoid crash when provider is not found
if (info) {
return info.url;
}
return "";
}
}