import { Request , Response } from "express" ; import { getManager } from "typeorm" ; import { Post } from "../entity/Post" ; /**
 * Loads all posts from the database.
 */ export async function postGetAllAction ( request , response ) { const postRepository = getManager ( ) . getRepository ( Post ) ; const posts = await postRepository . find ( ) ; response . send ( posts ) ; }