architex/lib/matrix_server/check.ex

11 lines
270 B
Elixir
Raw Normal View History

2021-08-19 21:42:24 +00:00
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