Add first step of creating an Article

This commit is contained in:
Thelonius Kort
2022-12-27 23:23:16 +01:00
parent bdc12d6b06
commit 5cbf05f650
12 changed files with 211 additions and 6 deletions

View File

@ -6,7 +6,7 @@ defmodule Outlook.Articles do
import Ecto.Query, warn: false
alias Outlook.Repo
alias Outlook.Articles.Article
alias Outlook.Articles.{Article,RawHtmlInput}
@doc """
Returns the list of articles.
@ -101,4 +101,8 @@ defmodule Outlook.Articles do
def change_article(%Article{} = article, attrs \\ %{}) do
Article.changeset(article, attrs)
end
def change_raw_html_input(%RawHtmlInput{} = raw_html_input, attrs \\ %{}) do
RawHtmlInput.changeset(raw_html_input, attrs)
end
end