architex/lib/matrix_server/check.ex
2021-08-19 23:42:24 +02:00

10 lines
270 B
Elixir

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