MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / getAllCities

Function getAllCities

pages/api/cptec/v1/cidade/index.js:6–22  ·  view source on GitHub ↗
(request, response)

Source from the content-addressed store, hash-verified

4import { getAllCitiesData } from '@/services/cptec';
5
6async function getAllCities(request, response) {
7 try {
8 const allCitiesData = await getAllCitiesData();
9
10 return response.status(200).json(allCitiesData);
11 } catch (err) {
12 if (err instanceof BaseError) {
13 throw err;
14 }
15
16 throw new InternalError({
17 message: 'Erro ao buscar informações sobre cidades',
18 type: 'city_error',
19 name: 'CITY_INTERNAL',
20 });
21 }
22}
23
24export default app().get(getAllCities);

Callers

nothing calls this directly

Calls 1

getAllCitiesDataFunction · 0.90

Tested by

no test coverage detected