Add GET /users route

This commit is contained in:
Adrian Obelmejias
2016-03-05 15:13:41 -05:00
parent 1030f80360
commit 9f8a04e556
2 changed files with 84 additions and 39 deletions
+5
View File
@@ -21,3 +21,8 @@ export async function createUser(ctx) {
ctx.throw(422, err)
}
}
export async function getUsers (ctx) {
const users = await User.find({}, '-password -salt')
ctx.body = users
}