mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Changed how body params are defined to prevent build issues with internals
This commit is contained in:
@@ -19,9 +19,7 @@ admin
|
||||
|
||||
const storageRef = admin.storage().bucket();
|
||||
|
||||
// Declaring our request protocol
|
||||
declare module "firebase-functions" {
|
||||
interface HttpRequest {
|
||||
interface RequestWithBody extends functions.Request {
|
||||
body: {
|
||||
passModel: string;
|
||||
serialNumber: string;
|
||||
@@ -45,7 +43,6 @@ declare module "firebase-functions" {
|
||||
logoFile: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Declaring our .env contents
|
||||
declare global {
|
||||
@@ -59,7 +56,8 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export const pass = functions.https.onRequest(async (request, response) => {
|
||||
export const pass = functions.https.onRequest(
|
||||
async (request: RequestWithBody, response) => {
|
||||
const newPass = await PKPass.from(
|
||||
{
|
||||
// Get relevant pass model from model folder (see passkit-generator/examples/models/)
|
||||
@@ -270,4 +268,5 @@ export const pass = functions.https.onRequest(async (request, response) => {
|
||||
result: "FAILED",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user