architex/lib/architex/check.ex
2021-09-01 14:43:55 +02:00

10 lines
258 B
Elixir

defmodule Architex.Check do
import Ecto.Query
alias Architex.{Repo, Account, Room}
alias ArchitexWeb.Client.Request.CreateRoom
def create_room do
account = Repo.one!(from a in Account, limit: 1)
Room.create(account, %CreateRoom{})
end
end