mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 03:19:10 +00:00
Allow an (optional) post-creation time to be submitted. (#4205)
* Allow an (optional) post-creation time to be submitted. This should allow a new post to be created with an initial date/time specified by the caller, which will be useful for people writing importers.. * Only allow `created_at` to be submitted via the API. This addresses the previous concern.
This commit is contained in:
parent
c012b18601
commit
8f8ad3fe4a
@ -544,7 +544,7 @@ class PostsController < ApplicationController
|
||||
:reply_to_post_number,
|
||||
:auto_track,
|
||||
:typing_duration_msecs,
|
||||
:composer_open_duration_msecs
|
||||
:composer_open_duration_msecs,
|
||||
]
|
||||
|
||||
# param munging for WordPress
|
||||
@ -557,6 +557,10 @@ class PostsController < ApplicationController
|
||||
|
||||
# We allow `embed_url` via the API
|
||||
permitted << :embed_url
|
||||
|
||||
# We allow `created_at` via the API
|
||||
permitted << :created_at
|
||||
|
||||
end
|
||||
|
||||
params.require(:raw)
|
||||
|
Loading…
x
Reference in New Issue
Block a user