From e79bdedb819415792eea49de7483885046d2a368 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 14 May 2018 18:54:22 +0200 Subject: change password form working --- bucky/db/index.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bucky/db/index.js') diff --git a/bucky/db/index.js b/bucky/db/index.js index 5e21603..f454c92 100644 --- a/bucky/db/index.js +++ b/bucky/db/index.js @@ -69,6 +69,10 @@ db.getUsernamesById = function(ids){ return knex.column("id").column("username") .select().from('users').where("id", "in", ids) } +db.getUsernames = function(){ + return knex.column("username") + .select().from('users').orderBy("username").pluck("username") +} db.checkUsernames = function(usernames){ return knex.column("username") .select().distinct().from('users').where("username", "in", usernames) -- cgit v1.2.3-70-g09d2