Skip to content

Commit

Permalink
user: set env
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 24, 2024
1 parent efc93af commit db344d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ class Group {
if (error) console.error(error)

const g = await this.get({ nt_group_id: args.nt_group_id })
if (g.length) {
// console.log(g)
return g[0].nt_group_id
}
if (g.length) return g[0].id

const groupId = await Mysql.insert(`INSERT INTO nt_group`, args)
return groupId
Expand Down
1 change: 0 additions & 1 deletion lib/session.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe('session', function () {
describe('get', () => {
it('finds a session by ID', async () => {
const s = await session.get({ nt_user_session_id: sessionId })
// console.log(s)
assert.ok(s.nt_user_session_id)
})

Expand Down
3 changes: 2 additions & 1 deletion lib/user.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const crypto = require('node:crypto')
const validate = require('@nictool/validate')

const Config = require('./config')
const Mysql = require('./mysql')
const Util = require('./util')
Util.setEnv()
const Config = require('./config')

class User {
constructor(args) {
Expand Down

0 comments on commit db344d4

Please sign in to comment.