aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/api.ts
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-04-01 17:50:13 +0200
committerMatt Strapp <matt@mattstrapp.net>2022-04-01 17:50:13 +0200
commit5717af872df070a50b9c27ccb21e2753339ae8fe (patch)
tree70dc16e57f4e4c552f92810eaf9d16c2dfaa56aa /src/routes/api.ts
parentBump @typescript-eslint/parser from 5.16.0 to 5.17.0 (#37) (diff)
downloadee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar.gz
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar.bz2
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar.lz
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar.xz
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.tar.zst
ee4511w-web-5717af872df070a50b9c27ccb21e2753339ae8fe.zip
Attempt to add basic SAML
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--src/routes/api.ts (renamed from src/routes/pendulum.ts)8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/pendulum.ts b/src/routes/api.ts
index 66ad594..6cb804c 100644
--- a/src/routes/pendulum.ts
+++ b/src/routes/api.ts
@@ -222,13 +222,13 @@ api
/**
* Verify that the file exists and is a regular file so it can be sent to the user
- * @param file The path to the file
- * @param res The Express response object, used if the file is not accessible
- * @returns `true` if the file exists and is a regular file,`false` otherwise
+ * @param {string} file The path to the file
+ * @param {Response} res The Express response object, used if the file is not accessible
+ * @returns {Promise<boolean>} `true` if the file exists and is a regular file,`false` otherwise
*
* `AFTER THIS POINT, THE API HAS ALREADY SENT A RESPONSE, SO THE FUNCTION THAT CALLED IT SHOULD NOT RETURN ANOTHER RESPONSE `
*/
-async function verifyFile(file: string, res: Response) {
+async function verifyFile(file: string, res: Response): Promise<boolean> {
// Make sure the file being requested to run exists
try {
await access(file);