mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +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();
|
const storageRef = admin.storage().bucket();
|
||||||
|
|
||||||
// Declaring our request protocol
|
interface RequestWithBody extends functions.Request {
|
||||||
declare module "firebase-functions" {
|
|
||||||
interface HttpRequest {
|
|
||||||
body: {
|
body: {
|
||||||
passModel: string;
|
passModel: string;
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
@@ -44,7 +42,6 @@ declare module "firebase-functions" {
|
|||||||
thumbnailFile: string;
|
thumbnailFile: string;
|
||||||
logoFile: string;
|
logoFile: string;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Declaring our .env contents
|
// Declaring our .env contents
|
||||||
@@ -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(
|
const newPass = await PKPass.from(
|
||||||
{
|
{
|
||||||
// Get relevant pass model from model folder (see passkit-generator/examples/models/)
|
// 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",
|
result: "FAILED",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user