diff --git a/config/config.json.template b/config/template.config.json similarity index 98% rename from config/config.json.template rename to config/template.config.json index 74d8255..94cc7a5 100644 --- a/config/config.json.template +++ b/config/template.config.json @@ -33,8 +33,7 @@ "pve": "pve", "db": "localdb", "auth": { - "pve": "pve", - "ldap": "paasldap" + "pve": "pve" } }, "application": { diff --git a/src/backends/backends.js b/src/backends/backends.js index b517e8e..31a330e 100644 --- a/src/backends/backends.js +++ b/src/backends/backends.js @@ -41,7 +41,7 @@ export class BACKEND { /** * Closes an opened session with the backend if needed * @param {*} token list of session token objects with token name and value - * @returns {Boolean} true if session was closed successfully, false otherwise + * @returns {Boolean} true if session was closed successfully, false otherwise */ closeSesssion (tokens) {} } @@ -59,6 +59,6 @@ export class DB_BACKEND extends BACKEND { /** * Interface for user auth backends. */ -export class AUTH_BACKEND extends BACKEND{ +export class AUTH_BACKEND extends BACKEND { modUser (username, attributes, params = null) {} } diff --git a/src/backends/localdb.js b/src/backends/localdb.js index 4dffcb7..6f91fd4 100644 --- a/src/backends/localdb.js +++ b/src/backends/localdb.js @@ -35,9 +35,13 @@ export default class LocalDB extends DB_BACKEND { writeFileSync(this.#path, JSON.stringify(this.#data)); } - openSession (credentials) { return [] } + openSession (credentials) { + return []; + } - closeSesssion (tokens) {return true } + closeSesssion (tokens) { + return true; + } addUser (username, config = null) { config = config || this.#defaultuser; diff --git a/src/routes/auth.js b/src/routes/auth.js index aea4ea3..d8fca57 100644 --- a/src/routes/auth.js +++ b/src/routes/auth.js @@ -99,7 +99,7 @@ router.post("/password", async (req, res) => { res.status(response.status).send(); } else { - res.status(response.status).send({error: response.data.error}); + res.status(response.status).send({ error: response.data.error }); } } else {