Parking Pass

node v14.20.1
version: 1.1.0
endpointsharetweet
const url = require("url") // This endpoint will return valid ComponentJSON, for using in E2E testing and test parties // It is a VerticalContainer containing two elements // - a header, which uses the user's name, taken from the info sent to the endpoint // - a QR code exports.endpoint = function(request, response) { const userName = "Example User" // request.body.attributes['full-name']; // TODO - get the user's name from the request, add it to the content response.setHeader('Content-Type', 'application/json'); response.end(JSON.stringify({ type: 'vertical-container', content: [ { type: 'heading', content: `Parking Pass for ${userName}` }, { type: 'qr-code', content: 'parking-pass-code' }, ], })); }
Loading…

no comments

    sign in to comment