2023-02-22 13:12:53 +00:00
|
|
|
import Setting from '../models/Setting';
|
|
|
|
import checkProviderIsSupported from '../utils/webDAVUtils';
|
|
|
|
|
|
|
|
interface Script {
|
2023-07-06 18:17:41 +00:00
|
|
|
exec: ()=> Promise<void>;
|
2023-02-22 13:12:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const script: Script = <Script>{};
|
|
|
|
|
|
|
|
script.exec = async () => {
|
|
|
|
try {
|
|
|
|
checkProviderIsSupported(Setting.value('sync.6.path'));
|
|
|
|
Setting.setValue('sync.allowUnsupportedProviders', 0);
|
|
|
|
} catch (error) {
|
|
|
|
Setting.setValue('sync.allowUnsupportedProviders', 1);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default script;
|
|
|
|
|
|
|
|
|