handleBulkMail
62 }
63 };
64
65 const handleBulkMail = async (type: EmailType) => { 66 if (data !== null) {
67 const users = data?.data.users as ManagedUser[];
68 if (type === 'reminder') {
handleMail
31 const reminderURL = '/api/email/reminder/';
32 const approvedURL = '/api/email/approved/';
33
34 const handleMail = async ( 35 firstName: string,
36 email: string,
37 type: EmailType,
Internal
10import type { EmailType } from '../stream/types';
11import { PrimaryButton } from '@/lib/Buttons.lib';
12
13export default function Internal() { 14 const { admin } = useAdmin();
15 const { token } = useAuth();
16 const [queryParams] = useSearchParams();
72 return false;
73};
74
75export default async function handler(req: VercelRequest, res: VercelResponse) { 76 const { headers } = req;
77 const cookieToken = headers.cookie?.split('; ').find((c) => c.startsWith('token='));
78 const tokenValue = cookieToken?.split('=')[1];
53 });
54};
55
56const verifyToken = async (token: string): Promise<boolean> => { 57 const apiURL = process.env.VITE_API_URL;
58 const apiHeaders = {
59 'Content-Type': 'application/json',
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
function sum(a, b) {
return a + b;
}
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}