Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 438 Bytes
import { Callback, Context } from "aws-lambda";
import fetchImage from "./fetch-image";
interface Event {
repo: string;
start?: number;
end?: number;
}
export const handler = async (
event: Event,
context: Context,
callback: Callback
) => {
try {
const data = await fetchImage(event.repo, event);
callback(null, JSON.parse(data.Payload));
} catch (err) {
callback(err);
}
};
You can’t perform that action at this time.