mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Added languages getter
This commit is contained in:
@@ -8,8 +8,6 @@ import { app } from "./webserver";
|
||||
import { getCertificates } from "./shared";
|
||||
import path from "path";
|
||||
import { PKPass } from "passkit-generator";
|
||||
/** Symbols are exported just for tests and examples. Replicate only if really needed. */
|
||||
import { localizationSymbol } from "passkit-generator/lib/PKPass";
|
||||
|
||||
app.route("/localize/:modelName").get(async (request, response) => {
|
||||
const passName =
|
||||
@@ -51,10 +49,7 @@ app.route("/localize/:modelName").get(async (request, response) => {
|
||||
// This language does not exist but is still added as .lproj folder
|
||||
pass.localize("zu", {});
|
||||
|
||||
console.log(
|
||||
"Added languages",
|
||||
Object.keys(pass[localizationSymbol]).join(", "),
|
||||
);
|
||||
console.log("Added languages", Object.keys(pass.languages).join(", "));
|
||||
|
||||
const stream = pass.getAsStream();
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { finish400WithoutModelName, createPassGenerator } from "../shared";
|
||||
import type { ALBEvent, ALBResult } from "aws-lambda";
|
||||
import type { PKPass } from "passkit-generator";
|
||||
import { localizationSymbol } from "passkit-generator/lib/PKPass";
|
||||
|
||||
/**
|
||||
* Lambda for localize example
|
||||
@@ -36,10 +35,7 @@ export async function localize(event: ALBEvent) {
|
||||
LOCATION: "plassering",
|
||||
});
|
||||
|
||||
console.log(
|
||||
"Added languages",
|
||||
Object.keys(pass[localizationSymbol]).join(", "),
|
||||
);
|
||||
console.log("Added languages", Object.keys(pass.languages).join(", "));
|
||||
|
||||
return (await passGenerator.next(pass as PKPass)).value as ALBResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user