end
end
+ def create(%{assigns: %{user: _user}} = conn, %{"media_ids" => _} = params) do
+ create(conn, Map.put(params, "status", ""))
+ end
+
@doc "GET /api/v1/statuses/:id"
def show(%{assigns: %{user: user}} = conn, %{"id" => id}) do
with %Activity{} = activity <- Activity.get_by_id_with_object(id),
NaiveDateTime.to_iso8601(expiration.scheduled_at)
end
- test "posting an empty status with an attachment", %{conn: conn} do
+ test "posting an undefined status with an attachment", %{conn: conn} do
user = insert(:user)
file = %Plug.Upload{
conn
|> assign(:user, user)
|> post("/api/v1/statuses", %{
- "media_ids" => [to_string(upload.id)],
- "status" => ""
+ "media_ids" => [to_string(upload.id)]
})
assert json_response(conn, 200)