import { DataSource } from 'typeorm';
export async function handler(dataSource: DataSource, { user }) {
  return dataSource.query(`
  SELECT title,update_time,id,length(regexp_replace (  content, '<.+?>', '') ) as length FROM course_notes  WHERE creator = '${user.userId}' 
 `);
}
