Update authentication method
This commit is contained in:
17
slices/admin/repos/user_repo.rb
Normal file
17
slices/admin/repos/user_repo.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
module Admin
|
||||
module Repos
|
||||
class UserRepo < Adamantium::Repo[:users]
|
||||
commands :create
|
||||
|
||||
def exists(id)
|
||||
!!users
|
||||
.where(id: id)
|
||||
.one
|
||||
end
|
||||
|
||||
def by_email(email:)
|
||||
users.where(email: email).one
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user