From ea9639c7c2b6c6a69e8a7a39a85d50855df220c0 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Sun, 23 May 2021 20:34:28 +0200 Subject: [PATCH] feat(server): added loginWithCredentials endpoint; feat(webui): added loginWithCredentials call --- server/src/routes/api/post/index.ts | 3 ++- server/src/routes/api/post/loginWithCredentials.ts | 14 ++++++++++++++ webui | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 server/src/routes/api/post/loginWithCredentials.ts diff --git a/server/src/routes/api/post/index.ts b/server/src/routes/api/post/index.ts index 0312a5c..1492993 100644 --- a/server/src/routes/api/post/index.ts +++ b/server/src/routes/api/post/index.ts @@ -1,4 +1,5 @@ import loginArl from './login-arl' import addToQueue from './addToQueue' +import loginWithCredentials from './loginWithCredentials' -export default [loginArl, addToQueue] +export default [loginArl, addToQueue, loginWithCredentials] diff --git a/server/src/routes/api/post/loginWithCredentials.ts b/server/src/routes/api/post/loginWithCredentials.ts new file mode 100644 index 0000000..c6e47b9 --- /dev/null +++ b/server/src/routes/api/post/loginWithCredentials.ts @@ -0,0 +1,14 @@ +import { ApiHandler } from '../../../types' + +const path = '/loginWithCredentials' + +const handler: ApiHandler['handler'] = (req, res) => { + const { username, password } = req.body + + console.log({ username, password }) + res.send(null) +} + +const apiHandler = { path, handler } + +export default apiHandler diff --git a/webui b/webui index 856fdbb..f659aff 160000 --- a/webui +++ b/webui @@ -1 +1 @@ -Subproject commit 856fdbb6b72f73a3346f9cb164109e03e461d804 +Subproject commit f659afffd2c9c7af0725179820da799af02dd53c