chore(provider): add handleException decorator

This commit is contained in:
hansputera
2021-11-08 15:43:15 +07:00
parent e10ed7c7d5
commit 6d331728c0
2 changed files with 4 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import {getFetch} from '..';
import {handleException} from '../decorators';
import {BaseProvider, ExtractedInfo} from './baseProvider';
/**
@@ -18,6 +19,7 @@ export class DLTikProvider extends BaseProvider {
*
* @param {string} url - Video TikTok URL
*/
@handleException
public async fetch(url: string): Promise<ExtractedInfo> {
// getting verification token
const response = await this.client('./');

View File

@@ -1,4 +1,5 @@
import {getFetch} from '..';
import {handleException} from '../decorators';
import {BaseProvider, ExtractedInfo} from './baseProvider';
import {keyGeneratorTTSave, matchLink} from './util';
@@ -20,6 +21,7 @@ export class TTSave extends BaseProvider {
* @param {string} url - TikTok Video URL
* @return {Promise<ExtractedInfo>}
*/
@handleException
public async fetch(url: string): Promise<ExtractedInfo> {
// getting token
const response = await this.client('./');