projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix factory.
[akkoma]
/
lib
/
pleroma
/
object.ex
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 715a35591815394f5bfd25b1856b3252f9c98cce..72991fa1f028a3610867edc5cd5f8eec6d79c54d 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-9,6
+9,11
@@
defmodule Pleroma.Object do
timestamps()
end
+ def create(data) do
+ Object.change(%Object{}, %{data: data})
+ |> Repo.insert
+ end
+
def change(struct, params \\ %{}) do
changeset = struct
|> cast(params, [:data])