summaryrefslogtreecommitdiff
path: root/bucky/db/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-14 18:54:22 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-14 18:54:22 +0200
commite79bdedb819415792eea49de7483885046d2a368 (patch)
tree9931fa389c1459347593155dd09a7c2cf3ecc009 /bucky/db/index.js
parentafd20e776ba207be9c4a00d29cb61dd3ea760eef (diff)
change password form working
Diffstat (limited to 'bucky/db/index.js')
-rw-r--r--bucky/db/index.js4
1 files changed, 4 insertions, 0 deletions
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)