Start api cleanup with the User model

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy
2013-10-16 16:48:03 -04:00
parent f551de21f7
commit ee8275cfdb
4 changed files with 69 additions and 40 deletions

View File

@ -154,11 +154,7 @@ sub currentUser_GET {
$self->status_ok(
$c,
entity => $c->model('DB::Users')->find({ 'me.username' => $c->user->username}, {
columns => [ "me.fullname", "me.emailaddress", "me.username", "userroles.role" ]
, join => [ "userroles" ]
, collapse => 1
})
entity => $c->model("DB::Users")->find($c->user->username)
);
}