Skip to content

Commit

Permalink
Remove small image size, we do not use it
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmwatson committed Jul 8, 2024
1 parent 7913226 commit a7727bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 4 additions & 10 deletions app/api/power-stations/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function GET(req: Request) {
"Decommission start",
"Decommission end",
"Thumbnail image",
"Short description"
"Short description",
],
});
const powerStations: PowerStation[] = [];
Expand Down Expand Up @@ -103,20 +103,14 @@ export async function GET(req: Request) {
decommissionEnd: new Date(fields["Decommission end"] as string),
years: 0,
},
description: fields["Short description"] as PowerStation["description"],
description: fields[
"Short description"
] as PowerStation["description"],
};

if (fields["Thumbnail image"]) {
const image: any = (fields["Thumbnail image"] as any)[0];
powerStation.images = {
small: {
id: image.id,
url: image.thumbnails.small.url,
width: image.thumbnails.small.width,
height: image.thumbnails.small.height,
filename: image.filename,
type: image.type,
},
large: {
id: image.id,
url: image.thumbnails.large.url,
Expand Down
1 change: 0 additions & 1 deletion types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export type PowerStation = {
operator?: Entity;
owner?: Entity;
images?: {
small: Image;
large: Image;
full: Image;
};
Expand Down

0 comments on commit a7727bd

Please sign in to comment.