summaryrefslogtreecommitdiff
path: root/src/api/models/post.ts
blob: baab63f99133e9016161f1a4625f458bcef13ac8 (plain)
1
2
3
4
5
6
7
import db from '../../db/mongodb';

export default db.get('posts') as any; // fuck type definition

export function isValidText(text: string): boolean {
	return text.length <= 1000 && text.trim() != '';
}