lambder 1.0.102 → 1.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +14 -14
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -262,11 +262,11 @@ lambder.addApi("getCompanyName", async (ctx, res) => {
|
|
|
262
262
|
// attempts to serve the fallback file.
|
|
263
263
|
// Returns a JSON error if neither file is found.
|
|
264
264
|
|
|
265
|
-
return
|
|
265
|
+
return res.ejsFile(filePath, pageData, headers);
|
|
266
266
|
// Renders and serves an ejs file from the server's ejs directory, with optional headers.
|
|
267
267
|
// Returns a JSON error if file is not found.
|
|
268
268
|
|
|
269
|
-
return
|
|
269
|
+
return res.ejsTemplate(template, pageData, headers);
|
|
270
270
|
// Renders and serves an ejs template string, with optional headers.
|
|
271
271
|
|
|
272
272
|
return res.api(payload, { notAuthorized, message, errorMessage }, headers);
|
|
@@ -280,18 +280,18 @@ lambder.addApi("getCompanyName", async (ctx, res) => {
|
|
|
280
280
|
// - Immediately return the value.
|
|
281
281
|
// - Skip the afterRender hooks.
|
|
282
282
|
|
|
283
|
-
res.die.raw(param);
|
|
284
|
-
res.die.json(data, headers);
|
|
285
|
-
res.die.xml(data);
|
|
286
|
-
res.die.html(data, headers);
|
|
287
|
-
res.die.status301(url, headers);
|
|
288
|
-
res.die.status404(data, headers);
|
|
289
|
-
res.die.cors();
|
|
290
|
-
res.die.fileBase64(fileBase64, mimeType, headers);
|
|
291
|
-
res.die.file(filePath, headers, fallbackFilePath);
|
|
292
|
-
await res.die.ejsFile(filePath, pageData, headers);
|
|
293
|
-
await res.die.ejsTemplate(template, pageData, headers);
|
|
294
|
-
res.die.api(payload, { versionExpired, sessionExpired, notAuthorized, message, errorMessage }, headers);
|
|
283
|
+
return res.die.raw(param);
|
|
284
|
+
return res.die.json(data, headers);
|
|
285
|
+
return res.die.xml(data);
|
|
286
|
+
return res.die.html(data, headers);
|
|
287
|
+
return res.die.status301(url, headers);
|
|
288
|
+
return res.die.status404(data, headers);
|
|
289
|
+
return res.die.cors();
|
|
290
|
+
return res.die.fileBase64(fileBase64, mimeType, headers);
|
|
291
|
+
return res.die.file(filePath, headers, fallbackFilePath);
|
|
292
|
+
return await res.die.ejsFile(filePath, pageData, headers);
|
|
293
|
+
return await res.die.ejsTemplate(template, pageData, headers);
|
|
294
|
+
return res.die.api(payload, { versionExpired, sessionExpired, notAuthorized, message, errorMessage }, headers);
|
|
295
295
|
});
|
|
296
296
|
```
|
|
297
297
|
|