Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Nov 10, 2023
1 parent 7917492 commit 417bd0e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions lib/orangutan/context/domain_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule Orangutan.Context.DomainContext do
"""
def get_domain_by_uuid(uuid) do
from(
u in Domain,
d in Domain,
where: u.uuid == ^uuid
)
|> Repo.one()
Expand Down Expand Up @@ -89,7 +89,7 @@ defmodule Orangutan.Context.DomainContext do
Retrieve Domains
"""
def get_domains(offset, limit) do
from(u in Domain,
from(d in Domain,
limit: ^limit,
offset: ^offset
)
Expand All @@ -100,7 +100,7 @@ defmodule Orangutan.Context.DomainContext do
Retrieve User Domains
"""
def get_user_domains(user_id, offset, limit) do
from(u in Domain,
from(d in Domain,
user_id: ^user_id,
limit: ^limit,
offset: ^offset
Expand All @@ -112,7 +112,7 @@ defmodule Orangutan.Context.DomainContext do
Count all Domains
"""
def count_domains() do
from(u in Domain,
from(d in Domain,
select: count(u.id)
)
|> Repo.one()
Expand Down Expand Up @@ -155,7 +155,7 @@ defmodule Orangutan.Context.DomainContext do
"""
def get_meta_by_domain_id_key(domain_id, meta_key) do
from(
u in DomainMeta,
d in DomainMeta,
where: u.domain_id == ^domain_id,
where: u.key == ^meta_key
)
Expand All @@ -167,7 +167,7 @@ defmodule Orangutan.Context.DomainContext do
"""
def get_domain_metas(domain_id) do
from(
u in DomainMeta,
d in DomainMeta,
where: u.domain_id == ^domain_id
)
|> Repo.all()
Expand Down
12 changes: 6 additions & 6 deletions lib/orangutan/context/email_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule Orangutan.Context.EmailContext do
"""
def get_email_by_uuid(uuid) do
from(
u in Email,
e in Email,
where: u.uuid == ^uuid
)
|> Repo.one()
Expand All @@ -67,7 +67,7 @@ defmodule Orangutan.Context.EmailContext do
"""
def get_email_by_email(email) do
from(
u in Email,
e in Email,
where: u.email == ^email
)
|> Repo.one()
Expand Down Expand Up @@ -100,7 +100,7 @@ defmodule Orangutan.Context.EmailContext do
Retrieve Emails
"""
def get_emails(offset, limit) do
from(u in Email,
from(e in Email,
limit: ^limit,
offset: ^offset
)
Expand All @@ -111,7 +111,7 @@ defmodule Orangutan.Context.EmailContext do
Count all Emails
"""
def count_emails() do
from(u in Email,
from(e in Email,
select: count(u.id)
)
|> Repo.one()
Expand Down Expand Up @@ -154,7 +154,7 @@ defmodule Orangutan.Context.EmailContext do
"""
def get_meta_by_email_id_key(email_id, meta_key) do
from(
u in EmailMeta,
e in EmailMeta,
where: u.email_id == ^email_id,
where: u.key == ^meta_key
)
Expand All @@ -166,7 +166,7 @@ defmodule Orangutan.Context.EmailContext do
"""
def get_email_metas(email_id) do
from(
u in EmailMeta,
e in EmailMeta,
where: u.email_id == ^email_id
)
|> Repo.all()
Expand Down
10 changes: 5 additions & 5 deletions lib/orangutan/context/message_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule Orangutan.Context.MessageContext do
"""
def get_message_by_uuid(uuid) do
from(
u in Message,
m in Message,
where: u.uuid == ^uuid
)
|> Repo.one()
Expand Down Expand Up @@ -89,7 +89,7 @@ defmodule Orangutan.Context.MessageContext do
Retrieve Messages
"""
def get_messages(offset, limit) do
from(u in Message,
from(m in Message,
limit: ^limit,
offset: ^offset
)
Expand All @@ -100,7 +100,7 @@ defmodule Orangutan.Context.MessageContext do
Count all Messages
"""
def count_messages() do
from(u in Message,
from(m in Message,
select: count(u.id)
)
|> Repo.one()
Expand Down Expand Up @@ -143,7 +143,7 @@ defmodule Orangutan.Context.MessageContext do
"""
def get_meta_by_message_id_key(message_id, meta_key) do
from(
u in MessageMeta,
m in MessageMeta,
where: u.message_id == ^message_id,
where: u.key == ^meta_key
)
Expand All @@ -155,7 +155,7 @@ defmodule Orangutan.Context.MessageContext do
"""
def get_message_metas(message_id) do
from(
u in MessageMeta,
m in MessageMeta,
where: u.message_id == ^message_id
)
|> Repo.all()
Expand Down

0 comments on commit 417bd0e

Please sign in to comment.