This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "4ff3f646-3ee3-4227-b941-4a1467b9a478", | |
"name": "Monday_API", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "3883128" | |
}, | |
"item": [ | |
{ | |
"name": "Get Volunteer list", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-container class="new-mone" v-if="formSchema"> | |
<v-row> | |
<v-col> | |
<h1> | |
{{ formName }} | |
</h1> | |
</v-col> | |
</v-row> | |
<v-row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AppLogger from '@/services/AppLogger' | |
import type { UseTimeAgoMessages, UseTimeAgoUnitNamesDefault } from '@vueuse/core' | |
import { useI18n } from 'vue-i18n' | |
import { useTimeAgo } from '@vueuse/core' | |
const messages = { | |
en: { | |
common: { | |
timeAgo: { | |
'just-now': 'just now', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { errMessage } = require('../errController'); | |
const Event = require('./event.model'); | |
const Setting = require('./setting.model'); | |
const aggregateQueryOld = [ | |
{ | |
$match: { | |
$expr: { | |
$and: [ | |
{ $isArray: '$targetAudience' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cloudinary from 'cloudinary'; | |
import fs from 'fs'; | |
import { CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET, CLOUDINARY_CLOUD_NAME } from '@/config'; | |
cloudinary.v2.config({ | |
cloud_name: CLOUDINARY_CLOUD_NAME, | |
api_key: CLOUDINARY_API_KEY, | |
api_secret: CLOUDINARY_API_SECRET, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {COLLECTIONS} from '@/const' | |
import {NextApiRequest, NextApiResponse} from 'next' | |
import fs from 'fs/promises' | |
import formidable, {Fields, File, Files} from 'formidable' | |
import path from 'path' | |
import checkAuthMiddleware from '../../../backend/middleware/checkIsAdmin' | |
import {v4 as uuid} from 'uuid' | |
const IMAGE_DIRECTORY = './public/assets/images/' | |
const ACCEPTED_FILE_TYPES = ['jpg', 'png'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NextApiRequest, NextApiResponse} from 'next' | |
import jwt from 'jsonwebtoken' | |
type Handler = (req: NextApiRequest, res: NextApiResponse) => Promise<any> | |
const checkAuthMiddleware = (handler: Handler) => | |
async function (req: NextApiRequest, res: NextApiResponse): Promise<any> { | |
try { | |
// Check if the Authorization header exists and extract the token value | |
const authHeader = req.headers['authorization'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var triangleSize; | |
// Keep prompting for a valid positive number | |
while ( | |
isNaN(triangleSize) || | |
typeof triangleSize !== 'number' || | |
triangleSize < 3 || | |
triangleSize % 1 != 0 | |
) { | |
triangleSize = parseInt( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// take bag of balls in colors red,yellow,blue green with digit 1-9 | |
// args array of balls | |
const ball = { color: 'red', num: 1 }; | |
/** | |
* | |
* @param {number} min | |
* @param {number} max |
NewerOlder