From f972d5831d3b3761de6ab8c2cc6c1cb7e539e921 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 21 Feb 2024 22:48:22 -0800 Subject: [PATCH] user: comment out unused code --- lib/user.js | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/lib/user.js b/lib/user.js index 9c8a907..bcc7666 100644 --- a/lib/user.js +++ b/lib/user.js @@ -100,15 +100,15 @@ class User { } } - async get_perms(user_id) { - return await Mysql.execute( - ` - SELECT ${getPermFields()} FROM nt_perm - WHERE deleted=0 - AND nt_user_id = ?`, - [user_id], - ) - } + // async get_perms(user_id) { + // return await Mysql.execute( + // ` + // SELECT ${getPermFields()} FROM nt_perm + // WHERE deleted=0 + // AND nt_user_id = ?`, + // [user_id], + // ) + // } generateSalt(length = 16) { const chars = Array.from({ length: 87 }, (_, i) => @@ -152,23 +152,12 @@ class User { return false } - - async getSession(sessionId) { - let query = `SELECT s.* - FROM nt_user_session s - LEFT JOIN nt_user u ON s.nt_user_id = u.nt_user_id - WHERE u.deleted=0 - AND s.nt_user_session = ?` - - const session = await Mysql.execute(query, [sessionId]) - if (this.debug) console.log(session) - return session[0] - } } module.exports = new User() module.exports._mysql = Mysql +/* function getPermFields() { return ( `nt_perm.` + @@ -200,3 +189,4 @@ function getPermFields() { ].join(`, nt_perm.`) ) } +*/ \ No newline at end of file