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