text: import { f as fetchPosts } from "../../../../../chunks/fetchPosts-01a20bea.js";
  import "../../../../../chunks/config-702cd8c2.js";
  const get = async ({ params }) => {
    const { category } = params;
    try {
      const { posts } = await fetchPosts({ category });
      return {
        status: 200,
        body: {
          posts
        }
      };
    } catch {
      return {
        status: 500,
        body: {
          error: `Could not retrieve total number of ${category} posts.`
        }
      };
    }
  };
  export { get };
  