Home / File/ test-old-api.ts — astro Source File

test-old-api.ts — astro Source File

Architecture documentation for test-old-api.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  47832d5b_0226_360e_5953_b95adc492fda["test-old-api.ts"]
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  47832d5b_0226_360e_5953_b95adc492fda --> f16d8c76_2866_6150_bd14_0347b59abfe9
  48f80d01_e646_3924_78f6_a9d836644746["astro:content"]
  47832d5b_0226_360e_5953_b95adc492fda --> 48f80d01_e646_3924_78f6_a9d836644746
  style 47832d5b_0226_360e_5953_b95adc492fda fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { APIRoute } from 'astro';
import { getCollection } from 'astro:content';

export const prerender = false;

export const GET: APIRoute = async () => {
	try {
		// @ts-ignore This should throw an error because liveStuff is a live collection
		const collection = await getCollection('liveStuff');
		return Response.json({ collection });
	} catch (error: any) {
		return Response.json(
			{
				error: error.message
			},
			{
				status: 500,
			},
		);
	}
};

Subdomains

Functions

Dependencies

  • astro
  • astro:content

Frequently Asked Questions

What does test-old-api.ts do?
test-old-api.ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in test-old-api.ts?
test-old-api.ts defines 1 function(s): GET.
What does test-old-api.ts depend on?
test-old-api.ts imports 2 module(s): astro, astro:content.
Where is test-old-api.ts in the architecture?
test-old-api.ts is located at packages/astro/test/fixtures/live-loaders/src/pages/test-old-api.ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/live-loaders/src/pages).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free