import { DataSource } from 'typeorm';
export async function handler(dataSource: DataSource, { user }) {
  const [{ count }] = await dataSource.query(`
  SELECT COUNT(id) as count FROM course_notes as cn WHERE cn.creator = '${user.userId}'
 `);
  return count;
}
