File size: 996 Bytes
3d23b0f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import * as provider from '../provider';
export async function getTrendingDiscuss(first: number): Promise<any> {
try {
return await provider.fetchTrendingDiscuss(first);
} catch (error: any) {
console.error('LeetCode Trending Discuss Error:', error.message);
throw new Error('Error fetching LeetCode trending discussions');
}
}
export async function getDiscussTopic(topicId: number): Promise<any> {
try {
return await provider.fetchDiscussTopic(topicId);
} catch (error: any) {
console.error('LeetCode Discuss Topic Error:', error.message);
throw new Error('Error fetching LeetCode discuss topic');
}
}
export async function getDiscussComments(params: any): Promise<any> {
try {
return await provider.fetchDiscussComments(params);
} catch (error: any) {
console.error('LeetCode Discuss Comments Error:', error.message);
throw new Error('Error fetching LeetCode discuss comments');
}
}
|